before refactoring to use ModelSet instead of model