calculations.js (not complete)