improve entity type selection