graph: cleaner depth first search