added check for device name