add end of batch