modify device state