refactored Model