ex7: created a simple thermostat