Modify saving procedure