reverting query