As a show based on a true story, “The Dropout” doesn’t have a ton of twists. But few moments on television this year were as unexpected or as jaw-dropping as the scene where Elizabeth Holmes (Amanda Seyfried) enters Sunny Balwani’s (Naveen Andrews) office dancing to the 2011 Lil Wayne hit “How to Love,” during the show’s fifth episode, “Flower of Life.” In an interview with Variety for “Making a Scene,” presented by HBO, series creator Elizabeth Meriwether revealed the origins behind the instantly viral scene.

“I originally wrote this to be a sex scene between them, for legal reasons we just decided not to do that, but I wanted this moment of connection or closeness,” Meriwether said. “Dancing to hip-hop was I guess, the thing she did when she thought no one was looking. So you see that in the early episodes, and it felt like a kind of secret language between them.”

Meriwether was joined by Seyfried, Andrews and episode director Francesca Gregorini to discuss the making of the “How to Love” scene with Variety’s Meredith Woerner and Michael Schneider. The four talked to Woerner and Schneider about the evolution of the scene and the process of shooting the cringe-inducing moment of intimacy between the two scammers.

Once Meriwether decided on transforming the moment from a sex scene to a dance, the scene went through a few evolutions before it landed on the final moment. Originally, the scene was shot as a lip sync duet between Sunny and Elizabeth, but it was decided it was more appropriate for the moment and the story for Elizabeth to be performing as a solo, as an apology to Sunny. According to Meriwether, Hulu initially asked them to shorten the very long scene, but she refused.

Seyfried wasn’t given any direction on what the dance would look like from either Meriwether or Gregorini. To find the jerky dance moves for the moment, she watched a recording of Holmes dancing on stage at a Theranos event, and leaned into the awkwardness of the scene. The lip sync to “How to Love” came less naturally to Seyfried, who admitted she flubbed the lyrics many times.

“There were maybe three takes where I got it right,” Seyfried said. “I still don’t know it.” But ultimately, this wild moment laid the foundation for a much bigger reveal between the two characters and their power dynamic. “It’s incredibly important because it sums up their relationship,” Andrews said. “There’s almost a wall which he can’t penetrate, no one can penetrate. And he’s extensively the closest person to her.”

“The Dropout” is streaming on Hulu. Watch the full “Making a Scene” video above.