Fans were expecting Avengers: Endgame to be a game changer, especially with the events of Avengers: Infinity War and all the hype leading up to the fourth film. If audiences were assuming Endgame would be like Infinity War, they obviously found that they were very wrong; Marvel Studios President Kevin Feige expressly stated that he wanted the two films to stand on their own and differ in terms of tone and structure. But all those deaths and the finality some of those losses brought? That was still a shocker to many—even though we know we’ll be seeing some of those faces again.

So, how did screenwriters Stephen McFeely and Christopher Markus figure out who would stay and who would go? Well, apparently they had pretty free rein over that query, as they shared in a recent interview with Vanity Fair. Of course, the losses had to make sense within the story, but the writers did have a surprising amount of say over the decisions.

One thing they did note, though, was that Marvel asked that Thanos be a central figure in the battle. Markus elaborated:

“I think really all we were handed was Thanos, which necessitates the use of the Infinity Stones – which are this, this, and this throughout the MCU – and ‘if you want to get rid of people, you can, but you’re under no obligation to just kill them willy nilly.’ And that was just about all.”

However, McFeely did make it very clear that the choices were not made indiscriminately. Markus also added that Marvel wanted them to write a strong story, and if that meant killing characters, OK. If it didn’t, that was fine too. He recalled being informed that “if there’s a good story to be told and no one dies, go ahead and tell that one too.”

In fact, they had a wide array of possibilities because there were a number of different characters they were able to add to the film. “There were a bunch of obvious implications from that,” Markus said. He added:

“Namely, we could bring in the Guardians, because two of Thanos’ stepdaughters were on that ship. It could be anybody from anywhere, and in fact should be.”

That’s quite the weight to have on two people’s shoulders! With such massive effects from the events of Endgame, it will be interesting to see how that ripples through MCU’s upcoming Phase 4.