dfs,bfs and new