Add sum method.