refactor model2