Creating local storage saving method