improved QueryAnonymizer