Update adv_calc.c