AutoSwitch library