corrected calculation for Fahrenheit and Celsius