fixes to distance_dependency.py