added configurable state transitions