batch the event insertions