add DFS and BFS