refactor: convert to localstorage