modify save handler