revise the calculations in cand generation