added storing of temperature