A basic dfs traversal