writing DFS stack data struct