refactoring decorator in model