add localstorage functions