started adding trapezoidal approximations