Showrunner Steve Holland also talks with THR about how the season 11 finale honored Stephen Hawking.

[This story contains spoilers from the season 11 finale of CBS’ The Big Bang Theory, “The Bow Tie Asymmetry.”]

Despite a wedding multiple seasons in the making, CBS’ The Big Bang Theory still found a way to deliver a surprise during Thursday’s season finale nuptials between Sheldon (Jim Parsons) and Amy (Mayim Bialik).

Among the season 11 finale highlights: Star Wars favorite Mark Hamill played himself and officiated the ceremony as a favor to Howard (Simon Helberg), who found his lost dog. Kathy Bates and comedian Teller made their debuts as Amy’s parents. But the real surprise came after Sheldon found inspiration from Amy’s remark that some things — like his bowtie — can’t be perfectly even. The logic led the brilliant scientist to a breakthrough: “super asymmetry.”

The breakthrough came as Sheldon was visiting Amy in the bridal suite, using the mirror to break down the details of his discovery and crediting his bride to be with helping to inspire him. In a show of just how much Sheldon has grown over the years, he insists that the duo both take credit for the discovery. What’s more: Sheldon also hits pause on the math and, in another example of his growth, says the details can wait until after the ceremony.

The wedding-themed finale also featured a sweet end tag that was cut for time that featured Sheldon receiving a gift of a pocket watch from Stephen Hawking that was sent before his death.

Below, showrunner Steve Holland — who has been with the Chuck Lorre, Bill Prady and Steve Molaro comedy since season three — talks with The Hollywood Reporter about how Sheldon’s discovery will play a role in season 12. (And if the comedy will wrap next year.)

Michael Yarish/CBS

Amy and Sheldon’s wedding has been something that this show has been leading up to for years. How much of the episode was wish fulfillment — ideas that you’ve talked about over the years — vs. organic ideas when you sat down to write the episode?

It was a bit of both. There were certainly things that were a chance for us to meet some family members that we’ve never met. We knew early on that that was going to be a fun casting opportunity. It came up a bit later in the process that maybe one of their friends gets them a special guest to be the wedding officiant. That was more of a discovery as we were breaking out the story and seemed like an extra fun piece to add.

The episode was pieces that we knew that we had been building to. We knew that Amy had to meet Georgie (Jerry O’Connell) in last week’s episode and wanted to make sure that the wedding didn’t get overwhelmed by having to meet all these new people. And we knew we’d introduce Amy’s parents.

Mark Hamill signed on without seeing a script. Did he know he’d be performing the ceremony?

He knew. We knew what role we wanted him to be.

Was there anything that he suggested that you wrote into the episode?

We knew he’d be playing himself and officiating and we thought it would be funny that he got so emotionally moved by the vows that he started crying and had a hard time getting through it. So that was in our initial pitch to him, which he thought was funny. He asked if there would be a lot of Star Wars references and said that people ask him questions all the time and he don’t know the answers to any of them. “Like, what’s the Wookie home planet?!” So we wrote that into the script after our conversations with him — and Stewart has to keep stepping up and filling in answer for him.

Of all the guest stars in the finale, I’m curious why Bob Newhart didn’t reappear in Jedi form as Professor Proton.

We talked about it and we had Bob appear to Sheldon before most of his big moments in life but we had had him on earlier this season. When we got to breaking out the wedding, it was getting so big and there were so many people to service that we just had to start making big decisions. My biggest worry was to make sure that we didn’t lose Sheldon and Amy and their story in the midst of all the chaos and all the guest stars. It was important to me to make sure that this was Sheldon and Amy’s day. We had a whole list of things on the board that we thought could happen and would be fun to have and we had to start going through and making hard decisions about what we could actually accomplish and what we had to let go.

What was the idea for Newhart?

Newhart in the past has always come and given Sheldon sage advice in his dreams. It would have been something like that. This was…