Making the singleswitch solution more modular