add graph_visit and revise BFS (tested)