Pretty Little Liars is a fantastic TV show. It's often dismissed as frivolous, as tends to happen with entertainment that targets teenage girls, and it's definitely ridiculous and over the top. Plenty of plot lines straight up make no sense. But the ABC Family show is also a great modern take on themes from detective fiction and film noir, a deliberate and potent exaggeration of high school conflict that works for the same reason Buffy the Vampire Slayer and Veronica Mars did, an unusually sophisticated treatment of teen sexuality, and a surprisingly powerful indictment of the patriarchy. I love it dearly and recommend it heartily to all.

Or I did, anyway, before the "summer finale" of its sixth season aired Tuesday night. After years of speculation, the episode unmasked "A," the anonymous tormentor who's been targeting the show's main characters: the not-as-artsy-as-she-thinks wannabe writer Aria Montgomery (Lucy Hale), the Type-A overachiever and Adderall addict Spencer Hastings (Troian Bellisario), the hyper-earnest competitive swimmer Emily Fields (Shay Mitchell), and the lovably scatterbrained but secretly super-smart Hanna Marin (Ashley Benson).

But many thought the precise nature of the revelation was awful and played into some really nasty, bigoted tropes.

To say more than that will require revealing lots of plot twists, but if you don't mind spoilers, here's what happened in the finale, where it went wrong, and why fans are furious.

Pretty Little Liars for beginners

If you've never seen the show, the basic premise is that the foursome at its center ("the Liars") used to be extremely close friends with Alison DiLaurentis (Sasha Pieterse), who served as the clique's Queen Bee and was generally an awful person. But then Alison was murdered … or was she? No, she was not, as was revealed at the conclusion of season four after years of hints; she was merely hit in the head with a rock and partially buried alive by her mother, after which she left Rosewood (the fictional Philly suburb in which the show is set) for a few years and went into hiding, only to return home in season five. You know how high school goes.

Anyway, one year after Alison's "death," the Liars start getting texts from someone identified only as "A" who appears to know damning secrets from their past. A torments them both psychologically and physically (she runs Hannah over with a car, for example); she did the same to Alison before her disappearance. The girls then proceed to break just about every law on the books regarding trespassing, breaking and entering, wiretapping, and so forth trying to stop and unmask A (and solve Alison's "murder"). Eventually, Mona Vanderwaal (Janel Parrish) — an old friend of Hanna's who felt Alison and the gang had stolen her away — was revealed to be A at the end of season two.

"Mona played with dolls, I play with body parts. Game on, bitches. -A."

But A, like the Dread Pirate Robert or Gossip Girl, is less a rigid designator than a title that passes from person to person, and sure enough, someone else stepped up and became A after Mona was unmasked and committed to Radley Sanitarium. That person — known by fans as "Big A" or "Uber A" — leads a group known as the "A-Team," of which at least seven different characters were members at various points, often without knowing who "Big A" was.

Big A was worse than Mona in just about every way. Her first text to the Liars announced, "Mona played with dolls, I play with body parts. Game on, bitches. -A." Sure enough, Big A repeatedly tried to murder the girls. She poisoned Aria, locked her in a crate, and tried to push her off a moving train; tried to burn Aria, Hanna, Emily, and Mona alive; tried to run over Mona, Emily, and Aria; crashed a car into Emily's living room and nearly killed her mom; kidnapped Emily, locked her in a wooden box, and tried to saw her in half; tried to freeze Spencer and Emily to death; and chased the Liars while firing at them with a gun, among other things. But her worst crime against the girls, by far, involved kidnapping them and trapping them in a prison known as the "Dollhouse," inflicting repeated psychological torture on them for weeks until they were eventually rescued. She also faked Mona's death and imprisoned her in the Dollhouse, making her dress up as and pretend to be Alison at all times.

What we learned Tuesday night

Before the finale, the show had already established that Big A was, in all likelihood, Charles DiLaurentis: an older brother that Alison, the Liars, and the audience didn't know existed until the end of season five. That explained Big A's obsession with Alison and her friends. The finale revealed that Big A is in fact Charlotte DiLaurentis (Vanessa Ray), who was known as Charles before transitioning. Charlotte and Alison's father was deeply transphobic and locked Charlotte in Radley Sanitarium at a young age. There, she befriended a troubled girl named Bethany Young, who turned against Charlotte by murdering another patient and trying to pin it on her. Eventually Charlotte made it out under a new identity: CeCe Drake.

CeCe has been a character on the show since season three, and was introduced as an older friend of Alison's whom the Liars never really knew. CeCe also dated Jason DiLaurentis for a period in an attempt to get closer to her brother (she insists they never committed incest). But one night, CeCe thought she saw Bethany outside her family home, and, knowing what Bethany was capable of and fearing for her family's safety, hit her on the head with a rock. Only it wasn't Bethany — it was Alison. That's why their mother tried to bury Alison: She didn't want to turn Charlotte in to the police and lose two daughters in one night. Bethany really was out and about that night, however, and was murdered by Mona, who thought she was Alison. Bethany's body was thought to be Alison's, which explains why people believed Alison to be dead for so long.

Later, in season three, Mona (while at Radley Sanitarium) told Charlotte that the Liars were glad Alison was dead. This enraged Charlotte and inspired her to take up the mantle of A and attempt to destroy the girls.

Why this is problematic

On the one hand, the character of Charlotte is a rare case of trans representation on TV, and while it hadn't tackled gender identity before, Pretty Little Liars has a history of being remarkably progressive on sexual orientation. One of the Liars, Emily, is openly gay, and her girlfriends and romantic plot lines are treated just as seriously as the other girls' plots with boys. Alison's sexuality is portrayed as fluid; she has relationships with men but also harbors a deep and intermittently reciprocated attraction to Emily. I. Marlene King, the show's creator and head writer (who wrote the finale), is openly gay herself.

But lots of viewers of the show thought the twist played into some really ugly tropes about trans people.

"The hands down most damaging trope about trans women is that they are deceitful. That they get into romantic relationships by lying about who they are, by withholding information, and tricking people into loving them," Autostraddle's Heather Hogan wrote in her recap of the episode. "Many, many people truly believe this lie and use it to justify murdering, and sexually and physically abusing trans women." Charlotte — who is deceitful to her core and, most egregious, seduced her own brother under false pretenses — exemplifies these harmful stereotypes about trans women, and influences how the show's viewers think about trans women in the process.

Even apart from that history, it's not okay that the only trans character on the entire show is a violent sociopath. "No matter what happened to A in the past, what he or she is doing now is not OK," Bustle's Kelsea Stahler writes. "Stalking, torturing, murdering, framing for murder, locking people up in a bunker/dollhouse and making them recreate prom with creepy mannequins are not sane behaviors."

Hogan also notes the show also encouraged misgendering of Charlotte, having characters refer to her as "he/she/it/bitch" rather than just "she": "And of course when I woke up this morning, I had dozens and dozens of messages on Twitter and Tumblr referring to Charlotte that way. The writers gave these transphobic people that language, just handed it right to them, and now it’s everywhere." Stahler adds that in an earlier episode, Big A confirms to Spencer she's Charles, and "appears to identify as a man." That's also misgendering, and disrespectful of Charlotte's identity as a woman.

Finally, there's the fact that Charlotte is played by Vanessa Ray, who is a cisgender (non-trans) woman. It's very common for films and TV shows to cast cisgender people in trans roles — think Rebecca Romijn on Ugly Betty, Jared Leto in Dallas Buyers Club, or Eddie Redmayne in The Danish Girl — but this denies work to trans actors and denies trans people the ability to represent themselves on screen.

Defenses of the show

King has already addressed this critique of the episode, and argued that Charlotte wasn't the true villain: The real villain was Charlotte and Alison's transphobic father, whose abuse of Charlotte warped her and made her into A.

"We tried to be very clear that Charles comes from a very crazy family," she told Entertainment Tonight's Leanne Aguilera. "Crazy runs in the family, I say, and it just so happens that this person, I think, suffered some tragic consequences of a crazy family, but having nothing to do with [being] transgender." Ray agreed: "She's not 'A' because she's transgender, and she's not transgender because she's 'A'. What she is is a person who was neglected as a child, who was never shown love or any humanity and because of that she went down a path of neglecting other people as though their humanity didn’t matter either."

"We did as much homework as we could and educated ourselves on hopefully being as sensitive as possible to the way we told the story," King elaborated in an interview with MTV's Crystal Bell. "I’ve gotten some tweets from transgender fans, and everybody so far seems to be very happy with the episode and how we told the story."

But note that in the ET quote, King is misgendering Charlotte. And when Aguilera asked if King considered casting a trans actor, King conceded that she had not: "You know, I didn’t even know that were was even an awareness of transgender actors at that time."

Defenses from other people not attached to the show were more compelling. At Jezebel, Claire Lobenfeld praised the way that Alison "doesn’t even blink" upon learning her sister is trans, arguing the reaction "helps to normalize trans identities." She quotes Hugh Ryan of the Pop Up Museum of Queer History arguing that Charlotte actually represents progress in treatment of trans villains: "It used to be: If you were trans, that was the reason you were a villain, like Sleepaway Camp or The Wasp Factory. [With Pretty Little Liars], the blame is actually shifted and it’s about [Alison’s father] Kenneth not being able to handle who [Charlotte] was."

But the best defense actually comes from Autostraddle's Hogan, who also acknowledged deep problems in the show's treatment of the issue. "At its core, Pretty Little Liars is a story about the way men assume ownership over women’s bodies, strip away their agency, deprive them of their of autonomy, deny them subjectivity, and silence them. It’s a story about how female victims are blamed for the crimes perpetrated against them by men," she writes. "The true villain of Pretty Little Liars is Kenneth DiLaurentis, and in painting Charlotte as a sympathetic character who was the ultimate female victim of the grossness of the patriarchy, the show elevated the very best things about itself."

What comes next?

It's not clear what role, if any, Charlotte will play in the show when it returns in January. At the end of Tuesday's episode, it leaped forward five years; the Liars were about to graduate from high school when the Charlotte revelations came out, and in the final scene, they were a year out of college, with Alison married and teaching at Rosewood High. The other Liars barge into her classroom and warn her to get out because "he" is coming.

It's unclear who "he" is, and I sure as hell hope the line doesn't refer to Charlotte. But the best-case scenario would be for the show to find a way to redeem her. It has a tendency to make previously reviled characters — notably Mona and Alison — sympathetic, at times more so than the Liars, and letting Charlotte be a hero would at least do something to make up for the problematic nature of the character to date.

Correction: This post originally said that Bethany Young killed a nurse at Radley; she killed Mrs. Cavanaugh, a former nurse who was then a patient at Radley.