Added code to store temperatures in the database