modified the integral parsing