add local storage check