added new distance method