add function to clear the local storage and improve usability for the store data function