state machine example updated
config fixed