BFS work