query engine updated to the new design