Like all movies, it starts with a screenplay: the original Knight and Day script, written by Patrick O’Neill, was called All New Enemies, and was a “sophisticated R-rated caper” about an older man who’s paired up with a younger guy. Then it morphed into Wichita, with Adam Sandler possibly attached, who ultimately turned it down. And after that, it became Trouble Man, which would star Chris Tucker and Eva Mendes.

Obviously, these iterations are a far cry from the action comedy coming out this summer, which stars Cameron as June Havens, who must figure out whether Tom’s character, a rogue secret agent, is telling the truth or not. Still, since Knight and Day is an original “spec” script, it endured the typical rewrites, casting changes, and parade of interested filmmakers. However, it didn’t die in development like many scripts unfortunately do — according to producer Steve Pink, it got passed around Hollywood because of “the strength of Pat’s writing” and the core idea of an unreliable protagonist.

Among other people attached to the project before it became Knight and Day include writer Dana Fox (who coincidentally penned the Cameron Diaz-starrer What Happens in Vegas), directors Phil Joanou (Gridiron Gang) and Tom Dey (Failure to Launch), and actor Gerard Butler (who just agreed to star in The Bounty Hunter with Jennifer Aniston), among many other writers, producers, and more.

Then, when Cruise and Diaz were signed on, they both offered ideas of their own. For example, Tom thought of how Cameron’s character, fully armed, flips over the handlebars of a motorcycle so that she’s facing him while he drives. Take a look in the international Knight and Day movie trailer: