switch state given by api