save and load and flush