moved distance calculation to geometric calculator