add ceStateMap to record the state
implement ceStateMap