got bfs running properly