using sigasi project and trying to implement a state machine