added batches for history dumping