stateWillUpdate method update