Added temperature measurement and tests