bfs runs to completion.. incorrectly