change query format