add to generate batchs
by a-koyama