Added shortest_path implementation