added query op test. automated test need refactoring of typechekcing code