Bob Alper, a rabbi who became a comedian and author, managed to create the best joke to beat out thousands of other entrants in the “Joke with the Pope” competition and earned himself the title of “honorary comedic advisor to the pope.”

The night before Pope Francis arrived for his first US visit on September 22, the Pontifical Mission Societies, the Catholic Church’s missionary arm, created The website asked for comedians to submit “a clean and kind” joke, the type of joke the pope might make, to be judged by a panel of holy humorists. The winner of the competition not only earned the title of “honorary comedic advisor to the pope,” but also earned $10,000 for a charity of his or her choosing.

According to The Pontifical Mission Societies, over the course of three weeks, there were thousands of entries from 47 different countries. Alper, who delivered his joke via video, managed to beat out comedic bigwigs like Conan O’Brien and Jimmy Fallon. Alper will donate the prize money to help house the homeless in Ethiopia.

Alper’s winning joke was as follows. “My wife and I have been married for 46 years, and our lives are totally in sync. At the same time that I got a hearing aid, she stopped mumbling.”

“It had it all,” Father Andrew Small, The Pontifical Mission Societies’ national director, told The Jewish Week of Alper’s joke. “It was the kind of joke I think the pope would use himself, and that’s what befits an honorary comedic advisor.”

Alper said that this joke was among his best work. “It’s reality,” he said. “It’s something with which people can identify. It exemplifies the Pope’s values, which are family, humor, warmth.”

According to The Jewish Week, Alper was ordained as a rabbi by Hebrew Union College in 1972 and served a Vermont congregation for 14 years before deciding to make stand-up comedy his full-time career. Alper has been performing at largely Jewish venues and college campuses for the past 27 years and has written three books about his experience as a rabbi-comedian.

“I think it’s fantastic,” Father Small said of Alper’s victory. “My response is ‘Mazeltov.’”