Last year, I got mad. After a fraught few months in which I nearly died, and then we moved, and our entire lives were in upheaval, and some of my good friends died (or were dying) and everything was just plain hard or sad or confusing or new, my husband and I went to a movie to lose track of our lives for a few hours.

The movie? Avengers: Infinity War. And the ending of that damn thing—well, let’s just say that it was the wrong ending for me at that stage of my life. I was furious. I hadn’t known that Infinity War was part one of two, or even that the second half had already been filmed and finished. I went into the film cold, expecting a rousing adventure, some challenging action, and an uplifting ending.

Whoops. No. . . .

At the time, I figured that the ending was a mistake. I no longer do, but I think the title is a mistake. There needs to be a part one in the title or something, some warning to the uninitiated that this film was the first part of a larger story. That’s only fair to those of us who have a life and missed the memo. Or rather, all the wrangling, in the entertainment press, over the title, whether or not the film should be marketed as part one of two or whether or not it should stand alone.

Someone decided to let the film—which doesn’t stand alone—stand alone. That ending left me shaken and upset. The film was clearly not what I needed at the time. My reaction remained the same when Ant-Man And The Wasp premiered in July. It was 99.9% of a good movie—with a post-credit sequence that spoiled it all for me. Or that’s what I would have told you at the time.

Fast forward to 2019, and sadly, a bit reluctantly, I found myself looking forward to Avengers: Endgame. I was reading the entertainment press (a little), ignoring the guesses from the folks who couldn’t tell a good story to save their butts, and thinking, Yeah, okay. I’ll see this. After all, I was 21 films into the 22-film saga. I should finish it off.

That’s what I told Dean, who knew how mad I was. He wasn’t that mad when he saw Infinity War, but he wasn’t happy. He shrugged off the marketing mistake better than I did.

The marketing mistake was just a blip anyway. Opening box office for Endgame was 1.2 billion dollars, breaking the records for the biggest opening for a film ever. And not just in money, but in ticket sales.

I was going to wait to see the film. I’m good at avoiding spoilers, but Dean isn’t. He wanted to go immediately. Or what is immediately for us, which is the Monday afternoon after opening weekend. Which turned out to be the exact right time and day. Yes, the theater we were in was full, but it wasn’t sold out, and we were able to enjoy the film with a crowd, but not have the crowd be distracting.

Everyone was engrossed. Somewhere in that first hour, our entire row had the sniffles. Together. The teenage girl next to me, who had clearly just gotten out of school for the day, was actively sobbing. Later, she moved into my line of sight as she leaned forward, so engrossed in the action that she nearly dropped her bucket of popcorn.

Endgame worked. And not just “well enough,” but it really worked. It did the hard stuff, such as keeping the casual viewer informed as to what thread from which film they were tying up as well as giving the hardcore fans a bunch of Easter Eggs. I fall between casual and hardcore. I didn’t review coming in, but I did read recaps, just to keep myself fresh. And I knew just enough to be happy.

I wasn’t sure they would pull an ending off, though. The task seemed too hard, the mountain too high. Hit great notes for every character we love? Okay, yeah. Cameos from the lesser characters? Yeah, all except for Goose (dammit!). Set up the new direction for the Marvel Cinematic Universe? Yeah, that too.

Storytelling on a vast scale, and somehow, it succeeded. Because care and attention were paid on all levels, and someone, somewhere, respected the story being told, the characters the story was about, and the audience who would consume the story.

Too often, storytellers fail at one of those three things.

It wasn’t until the ending of Game of Thrones a few weeks later that I realized something: even though the Marvel Cinematic Universe had angered me last year, I trusted the storytellers and the vision. I believed they would get the ending right—or right enough.

And that was because they had respected the story, the characters, and the audience all along. They had challenged us, and given us Easter Eggs, and brought the newbies along. They had tweaked the stories, and listened when the fans were worried. The MCU didn’t necessarily change their stories because of fan concerns, but still managed to address the concerns, sometimes with one line (I know we expected this to happen, but that other thing was what we did.)

I tell my writing students that endings are more important than beginnings. If readers perceive a problem with an ending, the actual problem isn’t with the ending at all. It’s with something else in the story. A missing detail in the beginning, or a wrong direction taken in the middle.

Whether or not the ending is going to work is often clear before the reader/viewer gets there. Yes, there’s the natural tension in any complex story, that worry that the author/authors aren’t going to be able to pull off the ending they had promised. That natural tension is something readers enjoy.

But there’s a different tension that happens when a series goes off the rails. It’s a slow leaking of confidence. Surely, the fan whispers to herself, they’re not going in that direction. Maybe that last scene was a mistake.

Sometimes the storytellers apologize for the mistakes. Sometimes they simply don’t know where they’re going. I always think about the first season of 24. The showrunners fully expected the show not to get past the first 13 episodes or so. It hadn’t tested well. No one realized that the show would hit the cultural zeitgeist by premiering shortly after 9/11.

If you watch that first season, you see the vamping in the middle. The showrunners hadn’t given the episodes past 13 much thought. Sure, they knew how that season would end, but that was the last episode. So they vamped, and lucked out. They got through the tough part to have a multi-season run.

Such things happen a lot, particularly in TV. Often endings are forced early, as a show gets canceled. Only in the past two years or so have executives realized that it’s better for a show to have an actual ending than it is to abruptly cancel after the finale episode of the season. That way the show might have a life post-first run, maybe even get a lot of viewers in the streaming services.

But that still doesn’t mean that shows will end well. I didn’t—don’t—watch Game of Thrones. I started the first episode and decided that I didn’t like any of the characters, and that rape and incest were not my preferred weekly entertainment, so I moved on. Still, GoT was a big deal in the culture, so I paid attention, especially on Twitter, where it became clear to me that fans were starting to hate-watch the show as much as two seasons before the actual ending.

The tone had changed, partly because the guy who was writing the road map, George R.R. Martin, couldn’t finish the final books. With the road map going from a detailed exploration of every stone on the path to a vague sketch of what lay ahead, the showrunners were left to guess at a lot of things—and lordy, sometimes they guessed wrong. Or rather, they didn’t know how to prepare the viewers for the ending that George had planned.

Again, the fault in any ending is earlier in the storytelling.

That’s why I got so angry with the ending of Infinity War. I wasn’t prepared for it. If there had been a part one in the title, I would have been. It was a simple fix. I would have watched the movie differently, rather than wondering how they were going to wrap everything up—when the movie abruptly ended.

Readers/viewers give their favorite storytellers one bad ending. One. After that, the fans stop trusting the storytellers. Some fans continue to consume the story, but with a wary eye to getting bitten by a bad ending one more time. Others simply quit following that series and never go back.

It all comes down to trusting the storyteller. And what I realized as I listened to the GoT talk was that I had trusted the Marvel Cinematic Universe storytellers, which was why I was willing to see the film as soon as possible. If I hadn’t trusted them, I wouldn’t have gone for weeks, maybe months.

Or I might have stopped altogether, as I did with my once-beloved Star Wars. I hated the first film in the reboot (so much that I can’t even remember what the damn thing is called, and I don’t want to remember), and then the side story that came out the following year also had a craptastic ending, and I was done. Forever. I vaguely miss the love affair I once had with the universe, and I am grateful to it for the early years and the inspiration it provided me. But in this decade? Naw. Not the stories for me.

It all comes down to trust. I’m heading to the next Marvel movie whatever it is. I’m enjoying the heck out of Agents of S*H*I*E*L*D because I know that their weird storytelling always pays off (for me, at least). And I’m there.

I try to remember all of that when I write my own stuff as well, working as hard as I can to make the endings satisfying for all of the readers. It’s a balance, and it’s hard—but it’s part of what we do as storytellers.

And something we should be cognizant of—not when we get to the end of the story, but long before.