adding masterswitch