Note to refactor url function.
Add set cardinalities method.