models to imodels