Update state machine (Hao) -1