Updated the integral_calc function:w