grouping writes before commit