revise query