Changes in distance.py