Simple state machine added