add some logic to temperature return