Changed to use deviceType