move device type to shared code