adjust query