use localStorage instead of sessionStorage