added time out to the state machine

Implmented as indicated in issue #128