Added DFS implementation