Updated distance calculation methods