models refactored