add device detection