using localstorage for data persistence instead of mongodb