add function to parsing the type of the device