modify state switcher