modified updateDevice call