query transformation works