improved the way getTemp looks for temp data