before change hooks