add saving of pool state.