correctly saving sums