add basic state with localStorage