changing sum to total