added calculations for temperature