Added code to have a toggle switch (not a simple circuit-breaker switch).