refactoring model, entity