corrected graph_bfs method params