shortest_path2 contains allsp