added functions to estimate the constraints. I am worried they are inaccurate and I need to go back to my old method of resizing the integrals accordingly