allDistances and recalcDistances
refactor dijkstra