Shortest path now working