Fred - Graph with pathsTo(); no duplicate code