updated clearData function to confirm the user wants to erase all data stored in local storage