working: setting date and recording data in local storage