Updated formulas to take values from user