Refactored createStateMachine method