Using a state transition table