fixed the integrand function