temperature function added