shortest path is now working