Added code to cooldevice