depth first search works