working of a device