Added pre-order DFS