//create a map to maintain iterator state
HashMap node2related = new HashMap();
//create the stack and place start node on
IndexedStack stack = new IndexedStack();
stack.push(from);
int iterations = 0;
O: while(!stack.isEmpty() && (iterations++ < m_maxitr)) {
//peek the stack
Node top = (Node)stack.peek();