improvement performance batch scripts