add cardinality validating for segments