Shortest_path interface improved