coding #39 recalculating total