Added distance calculation utils