improve Wildcard Matching