model refactored