Sure, the show’s not called Guys—but the men of Girls, which returns on Sunday, will certainly be missed after HBO’s buzzy hit concludes its final season this year. While they’re technically not the protagonists of Lena Dunham’s show, which chronicles the ebbs and flows of female friendship among four twentysomethings, at least one of the guys believes he should be. Says Andrew Rannells, who plays Elijah Krantz: “I think that every scene he’s in, he thinks he’s the star of Girls. He’s the Carrie Bradshaw.”

After five seasons, the show has mostly managed to break free of its early, erroneous comparisons to that other HBO show about four women in New York City. Still, it’s worth considering the vastly different ways that Sex and the City and Girls present their male characters. The former cast the majority of its countless male guest stars as boyfriends, husbands, or one-night stands, who wafted in and out of the lives of Carrie and her crew like so much expensive perfume. Many have been immortalized by reductive nicknames alone (read: Mr. Big; the New Yankee; Sean, the bisexual).

That’s not so with Girls, where the male characters are as complex, raw, and multi-faceted as their female counterparts. Take grouch-with-a-heart-of-gold Ray, played by Alex Karpovsky: though he’s introduced as Charlie’s best friend and band mate, he has gradually evolved into one of the funniest and most refreshing voices on the show, whether he’s railing against local politics, navigating the romantic waters with Shoshanna, or delivering some much-needed straight talk to Hannah. And then there’s Elijah, who, far from being a stereotype—a “sidekick who’s just gonna hold [Hannah’s] purse,” as Rannells puts it—encounters interesting arcs of his own, from a brief relationship with a suave news anchor to supporting Hannah following her dad’s unexpected, late-in-life revelation that he’s gay.

Given how central many of the guys have become, it might come as a surprise to learn that many of them thought they’d last on the show only for an episode or two.

As Rannells recalls, his first Girls stint was a single scene from Season 1, when Hannah confronts Elijah “about giving her HPV, and I say, ‘Your dad is gay.’ It was a pretty short scene.” Brief as it was, he and Girls creator-slash-star Lena Dunham clearly had great chemistry—and before long, Rannells had become a recurring guest star. In Season 4, he became a series regular.

Ebon Moss-Bachrach, who plays cerebrally melancholy Desi, shares a similar origin story. A weekend getaway at director Jesse Peretz’s house led him to a chance meeting with Girls show-runner Jenni Konner. Soon afterward, she and Dunham developed a small guest role for him. “You learn as an actor to make yourself indispensable, if you’re smart, so that’s what I tried to do. And it worked,” he says.

Desi’s genuine encouragement of Marnie’s musical talents inspired her to quit her day job and pursue a full-time career as a singer-songwriter. While their marriage fell apart in Season 5, their artistic connection has been key to Marnie’s character development—and, ultimately, has held more significance than their failed romance. “I think they both were each other's biggest fans, which goes a long way when you're making music together and you’re creating this beautiful, little, crystalline, special thing,” Moss-Bachrach says. To the character, losing a collaborator is “what’s real—not a marriage certificate.”

Rannells also benefited from the show’s resistance to cut-and-dry gender roles. As the primary gay friend in the girls’ lives, Elijah’s presence adds another layer of complexity to the show. “It’s a very unique friendship that gay men have with straight women. There’s a nurturing aspect to it, there’s a vulnerability, there’s an intimacy—but there’s also a nastiness.” he says.