dfs_stack example changed