Prepare to improve query api