Update distance.js