revising query