fixing getTemperature TODO