updates total calculation