update function travelInShortestPath