implemented temperature measurement