Re-factor in the state machine, results testing