Fixed to include an optimization in calc_c
Finished