a query engine with the extension of the RM