state command compare fixed
temperature function added