find all paths in graphs