That’s a wrap on Star Trek Beyond, folks. The follow-up to Star Trek Into Darkness and is now in the can, and director Justin Lin (Fast Five) will begin a deep dive into post-production for the next eight months to put the new sequel together. Lin, of course, stepped in to direct after J.J. Abrams departed the franchise he rebooted with 2009’s Star Trek; but he had a solid reason for exiting the director’s chair—helming Star Wars: The Force Awakens, of course.

Star Trek Beyond went through a curious road to production. Paramount’s early director search resulted in exciting possibilities like Joe Cornish (Attack the Block) and even Edgar Wright, but the studio ultimately went with Roberto Orci to take the helm. Despite Orci’s intimate involvement in the first two pictures as writer/producer, handing over the reins of the franchise to someone who’s never even directed an episode of TV was a massive show of faith. In the end, Orci’s attachment was short-lived; he exited the project after a few months of work, and Paramount began their director search anew with a desire to start over on the screenplay* (more on that below).

Enter an unexpected writing duo: Simon Pegg and Doug Jung. Pegg pulled double duty on the follow-up by reprising his role as Scotty and co-writing the screenplay alongside Jung, and they crafted a new story as Paramount enlisted Lin to fulfill their desire to turn Star Trek into the massive blockbuster franchise that it hasn’t quite hit yet.

[Update: I’ve been reminded of the fact that, during a press conference in Dubai earlier this year, Pegg actually revealed that he and Jung started from scratch on the screenplay:

“There was a script being developed by Bob Orci but Doug Jung and I never saw it, or were told anything about it. We started with a blank page in January and built the story from the ground up with Justin Lin and our producers at Bad Robot.”

So when Paramount enlisted Pegg and Jung, it wasn’t to work from a pre-existing story but to craft a new one altogether.]

What will become of Star Trek Beyond? Seeing as how they’ve only wrapped filming, we don’t know! But I’m mighty curious to see the story that Pegg and Jung have cooked up, and while we know very little about the plot of the movie, nabbing Idris Elba to play the villain was a sufficient coup.

For now, enjoy a photo from set in which Pegg sports an Episode VII hat, via Pegg’s Twitter. Star Trek Beyond opens in theaters on July 22, 2016 and also stars Chris Pine, Zachary Quinto, Zoe Saldana, Karl Urban, John Cho, Anton Yelchin, Joe Taslim, and Sofia Boutella.