How thermostats work The magic working principle must be understood?