helper scripts for master switch