Switch control