add some state machine defination.