added distance scripts