Adding temperature function