idb save and load gen