Modified 2D integration to add additional parameters