added a localstorage wrapper