before save to before commit