add sum array function
add tests for calculator and make tests pass