added checktemp