minor changes appended to device detection