rename TYPES constant to PATTERNS