made iterators for bfs tree