using new device detection logic