add state machine with order and spec