CHICAGO (AP) — An undercover FBI agent who played the central role in ensnaring a teenager in a 2012 sting told a sentencing judge Tuesday he didn’t hoodwink the then-18-year-old into agreeing to participate in a plot to bomb a Chicago bar and didn’t think the teen’s incessant laughter might have pointed to psychological problems.

In the second day of a multiday sentencing in Chicago federal court that has focused on Adel Daoud’s mental state before and after his arrest, secret FBI recordings were also played in public for the first time. In them, Daoud giggles constantly as he brainstorms various terrorist attacks, even suggesting one using what he calls “flying cars.”

Prosecutors sought to show that the undercover agent, who was 38 at the time and posing as an Islamic militant, neither manipulated a mentally unbalanced Daoud nor talked him into a crime he never would have contemplated on his own.

But the agent, whose identity was kept secret, did concede under cross-examination by defense attorney Thomas Durkin later Tuesday that he at one point tried to reassure Daoud when the teen wondered about whether some of his ideas were “crazy.”

“I don’t know how to make a bomb,” Daoud told the undercover agent a month before his arrest. “I don’t know how to do like, basic things, you know? All I have is ideas and fantasies.”

“Your fantasies, your, your ideas are good,” Durkin, reading aloud from a transcript of the FBI recording, quoted the agent as saying back to Daoud.

The agent acknowledged those were his words.

Daoud, of Hillside in suburban Chicago, was detained in September 2012 after trying to detonate what he believed was a 1,000-pound (454-kilogram) car bomb. Agents had provided him with the inert device and told him it would devastate a city block and kill hundreds of people. Daoud entered an Alford plea in November, saying at the time that he accepted the “factual basis” of the charges against him but denied culpability and maintained his innocence.

Daoud was temporarily deemed mentally unfit for trial in 2016 after U.S. District Judge Sharon Johnson Coleman concluded he sincerely believed shadowy figures were out to get him. Daoud had called Coleman “a reptilian overlord” and said his lawyers were in cahoots with the Illuminati.

The agent insisted that the almost never-ending laughter as they spoke didn’t make him question Daoud’s mental stability. The agent was referred to in court Tuesday only as “Mudafor” — the fake name he used in the sting.

He testified that in his previous experience with would-be terrorists, “they were all excited and happy with following through with their terrorist plan.”

He acknowledged under cross-examination, though, that it did occur to him that Daoud might have been under the influence of mood-altering drugs because of the laughter.

On wiretaps, Daoud could also be heard jumping from one topic to another, talking through his religious views one minute and then brainstorming alternative modes of carrying out a terrorist attack.

In his first meeting with the agent in July 2012, Daoud excitedly suggested deploying flying cars in an attack.

“You could get 20 of those (flying cars,)” Daoud is heard telling the agent as they sat in a park. “It would be much cheaper than five airplanes.”

The agent, sounding bewildered about just what Daoud means, responds: “Or maybe just try a regular car.” The agent added that an attack with flying cars “would take years and years to plan.”

After the talk of the flying cars, Daoud at a later meeting brought a list he had written out by hand of various potential targets, including several federal buildings in Chicago and a suburban shopping mall.

The agent insisted he sought to dissuade Daoud by describing the carnage that would result, hoping Daoud “would say, ‘I don’t want to do this any longer.'”

“If he had walked away, we would not have arrested him,” the agent testified.

Over objections from the defense and a media lawyer, Coleman closed her courtroom while the agent testified Tuesday, saying she reluctantly agreed with prosecutors that it was necessary for the safety of the still-active undercover FBI agent.

News reporters and members of the public listened to live audio of his testimony in another courtroom.