Add compose_patterns