I'd love to come up with a better design solution for the distance calculation, but it's midnight.