Added ability to turn batch on or off