added sum method to models