before save updated
update save function