update sums