Implements CAT data function

- Implements CAT data function and its two subtypes.
- Fixes syntax error in CAT function.