process batches of events