move model to plugin