added break; to main bfs