Added function to get device class