1) removed addEdgeD; 2) added bfs; 3) modified dfs