add save after editing function