added support for general nonlinear, discrete time models
added support for externally defined nonlinear, discrete time models