Create distance.js