models refactoring