Changes to breadthFirst