simplify code
changed signature of graph.findPaths