added query engine