ci4 model function