added localstorage usage