a tricky problem. wildcard matching.