nodes for bfs