Updated main to allow for DFS