commented dfs/bfs