added commit which is called at end of batch