afterCalculate hook