bfs doesn't work
reduce mess