save before leave
before leave