Spoilers ahead for Captain Marvel’s mid-credits and post-credits scenes, for Avengers: Infinity War, and for one big gag in Captain Marvel itself.

Back in 2008, when Nick Fury arrived at Tony Stark’s house to invite him to join the Avengers Initiative after the credits rolled, the sequence felt like most post-credit scenes did back then — a little in-joke for dedicated viewers who cared enough to sit all the way through the credits, instead of bolting for the doors the moment the action stopped. But over the past decade, Marvel’s post-credits scenes have become an institution. Occasionally, they’re just visual gags and callbacks to previous story elements, like Ant-Man and the Wasp’s 20-second view of Ant-Man’s abandoned house, with a super-sized ant playing his drum set. Usually, though, they’re a way of building anticipation for an upcoming film in the series, like when Avengers: Infinity War ended with Nick Fury summoning off-world hero Captain Marvel with a dated-looking pager, just before he dissolved in the wake of Thanos’ universe-changing finger-snap.

While the new MCU film Captain Marvel sets up why he’d reach out to her in a crisis, it takes place well before Infinity War, back in the 1990s. At least mostly. In a mid-credits scene, Captain Marvel abruptly catches up to the current MCU timeline — and the way it does bodes well for the sequel Avengers: Endgame, in theaters April 26th.

What happens in the mid-credits scene?

Captain Marvel’s mid-credits moment seemingly takes place a relatively short time after Avengers: Infinity War. Captain America (Chris Evans), Black Widow (Scarlett Johansson), James Rhodes (Don Cheadle), and Bruce Banner (Mark Ruffalo) are watching the worldwide death toll still actively mounting, as they try to come to terms with the aftermath of their battle with Thanos. They’ve retrieved Nick Fury’s pager; they’re aware that his final act was activating it; and they’ve been monitoring to see what it’ll do. When Rhodey tells them it’s “stopped doing whatever the hell it was doing,” they try to figure out how to reactivate the pager. They don’t know what it does, but they assume it was important. Turns out it’s stopped sending its signal because Captain Marvel has arrived — she appears in their lab, looking at them all distrustfully, and she asks: “Where’s Fury?”

Why is that promising?

The scene is less than a minute long, but it still feels like a promising development, because it suggests Avengers: Endgame isn’t going to spend a lot of time teasing Captain Marvel’s arrival, or setting up a dramatic action segment where she needs to miraculously show up to physically rescue the Avengers, who’ve done okay without her thus far. She’s clearly meant to be important to Endgame, but Marvel fans have worried about her, as the new kid in town, suddenly overshadowing the MCU’s existing characters who have years of shared history across multiple movies behind them. That overshadowing certainly could still happen, but the frankness of this scene — the lack of big dramatic buildup for this meeting — suggests a quieter integration with the existing cast.

There are certainly ways for Endgame to take that back — superhero history is jam-packed with misunderstandings or conflicting agendas between heroes, leading to brief hero-vs.-hero throwdowns, scripted by writers who know fans love to see who’d win a fight between their favorite good guys. There’s always the chance that this is the last quiet moment before an unnecessary (but probably interesting) battle between the existing Avengers and Captain Marvel, who might think they killed Fury and stole his wonky space-pager, or something equally contrived for the sake of action.

Or this scene might actually come later in Endgame. The post-credits scene in 2015’s Ant-Man, with Captain America and Falcon (Anthony Mackie) confronting Bucky Barnes (Sebastian Stan), turned out to be a sequence from the middle of the next MCU film on the roster, Captain America: Civil War. It’s always possible that this scene, with Captain Marvel’s arrival, happens much later in Endgame than it appears. We’ll know in about a month.

What happens in the actual post-credits scene?

This one’s even simpler: Goose, supposedly the cat who hung around Captain Marvel’s air base back when she was human pilot Carol Danvers, hurks up the Tesseract on Nick Fury’s desk. As revealed earlier in the movie, Goose is actually a Flerken, an alien creature that resembles an Earth cat, but contains its own pocket dimension and can suck things into it via its gigantic mouth-tentacles. Earlier in the film, Goose swallows the Tesseract, apparently to keep it safe from the alien Kree. Him barfing it up on Fury’s desk is mostly a gross-out visual gag meant to evoke a cat vomiting up a hairball. But it’s also meant to explain how the Tesseract ended up back in play, since it’s an important part of MCU continuity.

The Tesseract has appeared in some form (including a hologram, a diagram, and when its casing was smashed, as the Space Stone that makes up part of Thanos’ Infinity Gauntlet) in half the existing MCU movies, mostly as a power source. It powered HYDRA weapons in the 1940s in Captain America: The First Avenger, was recovered and studied by Tony Stark’s father Howard after World War II, and was stolen and used as a weapon by Loki in The Avengers. Thor eventually took it to Asgard for safekeeping, but Loki retrieved it again in Thor: Ragnarok, and it ended up in space with the Asgardian refugees, until Thanos came for it. It’s had a long and complicated history in the Marvel Cinematic Universe, and Captain Marvel complicates it even further, since it’s unclear how it ended up in the hands of Carol Danvers’ mentor, the Kree scientist Mar-Vell. But Goose swallowing it and barfing it back into Fury’s hands (metaphorically, thank goodness) puts it back with S.H.I.E.L.D. in the 1990s, where it needed to be ahead of the action in The Avengers in 2012.

As to Flerkens, they’re been an established part of Marvel Comics since 2014. Carol Danvers’ pet Chewie was similarly mistaken for a cat until Guardians of the Galaxy character Rocket Raccoon outed it as a Flerken in Kelly Sue DeConnick’s Captain Marvel comics run. It subsequently laid more than a hundred eggs on her ship. Who knows whether we’ll see that in Avengers: Endgame as well.