Changed distance.js file