batch by chunks