to review code for getdevicedata