cleanup, passing test for match queries