window.calculateNewVariables added