Adding replaceSpaces to queryEngine
Adding provable boolean check to queryEngine()