reformatted query