first version with support for locating a device.