added temperature function