better clearing of localstorage
better before