fixed stateMachine, renamed to linearStateMachine