Switch on state, then read commands specifically in the states that allow reading of commands, then switch on specific command.