Refactored sum to read 'size'