add local storage functions