modify save method, restore method