Update State done with minor prob

Prob: How do we know which is the state? currently, just take in the
current state eg state 1 to update the state. But by udpating the state
it should go to the next state?