modified dijkstra algorithm