add sum method