partials and model function