refactor
test for patternProperties