Adding the update_weight_calc() function to the recalculate feature.