add stateWillChange and more