almost done with breadth-first traversal