Warning: Spoilers ahead for Barbie

Barbie ended with Margot Robbie's titular character in the real world saying, ‘I'm here to see my gynecologist!” Now, director Greta Gerwig has come out and explained the line and its significance to the film.

Speaking to USA Today, Gerwig explained that the line was inspired by “growing up and being embarrassed about my body, and just feeling ashamed in a way that I couldn't even describe.”

She continued, “It felt like everything had to be hidden, and then to see Margot as Barbie, with this big old smile on her face, saying what she says at the end with such happiness and joy — I was like, if I can give girls that feeling of, ‘Barbie does it, too,' that's both funny and emotional.”

“There are so many things like that throughout the movie. It was always about looking for the levity and the heart,” Gerwig explained. “I knew I wanted to end on a mic-drop kind of joke, but I also find it very emotional.”

Greta Gerwig is an acclaimed director whose filmography includes Lady Bird and 2019's Little Women. Barbie marks her fourth directorial feature and stars Margot Robbie and Ryan Gosling as the titular doll and Ken. The two embark on a journey of self-discovery after the former begins questioning her own mortality. It has been a major success for Warner Bros., making over $360 million to date at the box office and breaking the record for the highest opening for a female-directed film.

Barbie is in theaters now.