Extending the state machine