add local storage and tests