implementation of dijkstra algorithm to plan travel routes