added preprocessing for queries
added no results clause
report: evaluation and complexity to be completed