Changes to the query api