improve batch management