Wildcard working version

copied code