example of saving and restoring room state