added localstorage feature