fixed wrapper to get model class