model module refactor