updating calculator to use native array reduce to sum array. updating tests accordingly