refactoring some models