Changes how DFS is performed