The latest installment of the show about everyone’s favorite foul-mouthed CGI bear, “Ted,” premiered on Peacock on Thursday, and fans noticed a presidential cameo that turned out to be the series creator, Seth MacFarlane, employing the use of AI for one hell of a Bill Clinton impersonation.

In the season’s fifth episode, entitled “The Sword in the Stoned,” the series’s out-of-touch, Boston-accented father, Matty Bennett (Scott Grimes) is forced to take a job at local Dunkin’ Donuts in Massachusetts. That’s when MacFarlane — as the AI-assisted and creepily accurate incarnation of the 42nd president — strolls into the store. Watch the clip here.

Though AI gave MacFarlane, also the voice of the titular character, the uncanny appearance of Clinton, the voice is very much all him, as he’s done the impression for many years.

“I’ve been doing my Bill Clinton impression since the early days of ‘Family Guy,’” MacFarlane told the Associated Press. “It’s an interesting example of how AI can be used as a tool and not necessarily trample on the art that the rest of the industry is doing. We tried prosthetics, we tried traditional CGI and everything just looked terrifying. So we just said, ‘To hell with it, let’s try AI.’ It worked. It was the only way to look like Bill Clinton.”