refactoring: change createModel method