refine for wildcard matching