Added query tester - not entirely satisfied with the result