modify save and load functions.