The second season of Crazy Ex-Girlfriend wraps tonight as Rebecca and Josh head to the altar at the speed of a bullet train. Before vows are exchanged, however, the audience will learn important details about Rebecca’s past and take a trip down memory lane in the form of a melancholic tune, “Rebecca’s Reprise.”

The medley is a lyrical mash-up of the new “Rebecca’s Reprise,” and oldie but goodies “You Stupid Bitch,” “I’m the Villain in My Own Story,” “I Love My Daughter (But Not in a Creepy Way),” and “We’ll Never Have Problems Again.” Conceived by star and executive producer Rachel Bloom, the song is meant to show Rebecca’s progression from the beginning of the series to the eve of her wedding in Malibu, showrunner Aline Brosh McKenna told Vulture.

“In her wildest dreams, Rebecca never thought she would actually be on the precipice of marrying Josh,” Brosh McKenna explained. “It causes her to reflect on her journey and show us why this wedding, for better or worse, rightly or wrongly, means so much to her in this moment. Because she lives in fantasy, what she remembers of her journey so far is her fantasies, which are songs. That is why it is a mash-up of reprises.”

Bloom prerecorded the song a cappella in a studio so producers could score it later based on her vocals. The scene was shot in five takes as the sun was setting in Malibu, and Brosh McKenna, who wrote and directed the episode, chose the fourth take. “It’s mostly in one shot,” she said. “I love her vocal performance. Gave me chills every time, and I’ve seen it conservatively one billion times.”

The finale — “Can Josh Take a Leap of Faith?” — will go a few unexpected places that set up the third season. “This episode is interesting because it takes a step back from the immediate plot momentum of the last few episodes to answer some questions viewers may have been asking about Rebecca’s life and her past,” Brosh McKenna said. “Despite being with her for 31 episodes, Rebecca remains, as Josh says, an enigma. This episode gives us a key to some of the mysteries about Rebecca. Next year, we will get to know her better — her past and her plans and strategies for the future.”

Crazy Ex-Girlfriend’s season-two finale airs tonight at 10 p.m.