refactor model_restricted