added getswitchstate