working on clear, save, and load state