found bfs bug