refactored models