get_model refactoring