final bits and pieces of query processor