added bfs, dfs