export the readTemp function