sum method complete