updated device detection