correct BFS