fixed getModels util method