Added stateTypeEnum for readability.