Add maximum distance calculations