DFS implemented - need improvements but works