added a script to set battery threshold