general updated with romberg integration method