Adding formulas to calculate result