Update calculate.js