added thermometer code