Added bfs_allpaths.