add localstorage method