update before change