revertquery improvemen