updating thermometer and javascript