some optimization for many wildcards