before deleting factories