added regex and thresholding to basic temperature script