refactoring, adding dns wildcard checking