swith between "connected" and "disconnected" states