model task refactoring