tested parallel BFS