improve class switcher