DFS and BFS updates