an on/off switch is used for controlling the flow of electricity to a device