add sum method to calculator.