added api doc for the StateMachine packge.refs #15