finish refactoring Model