static variable for saving and restoring state.