made category queries work