add localstorage support