thermostat functionality added