anchor.diff:        END DO
   
         ! call CalcContStateDeriv in order to run model and calculate dynamics with provided x and u
  -      CALL MD_CalcContStateDeriv( t2, u, p, x, xd, z, other, m, dxdt, ErrStat, ErrMsg )
  +      CALL MD_CalcContStateDeriv( t, u, p, x, xd, z, other, m, dxdt, ErrStat, ErrMsg )
   
   
         ! assign net force on fairlead Connects to the output mesh
  
positive.code:       TYPE(MD_ContinuousStateType)                        :: dxdt       ! time derivatives of continuous states (initialized in CalcContStateDeriv)
        TYPE(MD_ContinuousStateType)                        :: x2         ! temporary copy of continuous states used in RK2 calculations
        INTEGER(IntKi)                                      :: NdtM       ! the number of time steps to make with the mooring model
        Real(ReKi)                                          :: dtM        ! the actual time step size to use
        INTEGER(IntKi)                                      :: Nx         ! size of states vector
        INTEGER(IntKi)                                      :: I          ! counter
        INTEGER(IntKi)                                      :: J          ! counter
  
negative.code:       TYPE(MD_ContinuousStateType)                   :: dxdt    ! time derivatives of continuous states (initialized in CalcContStateDeriv)
        INTEGER(IntKi)                                 :: I       ! counter
        INTEGER(IntKi)                                 :: J       ! counter
  
        INTEGER(IntKi)                                 :: ErrStat2   ! Error status of the operation
        CHARACTER(ErrMsgLen)                           :: ErrMsg2    ! Error message if ErrStat2 /= ErrID_None
  
  
        ! below updated to make sure outputs are current (based on provided x and u)  - similar to what's in UpdateStates
  
        ! go through fairleads and apply motions from driver
        DO I = 1, p%NFairs
  