Corrected ReCalculate function