refactor - switched to local storage