implement getDeviceById