added functional timout to on/off switch.