refactored model spec