added dfs and bfs