Added an adaptative algorithm for numerical integration