modify save method