got shortestDist working