still a bug in DFS, saving state, need to handle directional