Distance & Midpoint application