DFS working - finds cycles