add command to save and load state