commit foreach