added time out to the state machine