device detection added