improve batch scripts