Threads added
DFS algo changed to recurse