updated to localstorage