Modifies the distanceCalculator method