Added retain_calc function for consideration