The distance calculation is doooone