add bfs and dfs