checking cardinality