Updated recalculate_sums method to be public