query processor and test cases completed