Implemented searchDevices Logic