We should replace in updatePaths function the Dijkstra's algorithm with the A*, due to the expected efficiency, Reference: https://en.wikipedia.org/wiki/A*_search_algorithm