add distance calculations