Separated switch control function