refactored models structure