added sum method