Adding setdevice