The film ends with the revelation that John Doe (Kevin Spacey) has meticulously planned a finale to his crimes that sees Mills (Brad Pitt) become the final sin, wrath, and murder John Doe. The killer had murdered Mills' wife, Tracy (Gwyneth Paltrow), and had her head delivered to him in a box.

It's an ending that helped elevate the film to classic status. But it only made its way to the big screen thanks to a happy accident.

Screenwriter Andrew Kevin Walker was working at Tower Records in New York when he wrote Seven, which was optioned in the early 90s with Christmas Vacation director Jeremiah Chechik coming on board to direct. Chechik wanted to make a very different movie. Among the changes Chechik requested from Walker was one to alter that inventive ending. There was to be no head in a box.

Walker reworked the script, and it seemed there was little hope that his original work would make it to the big screen (if the film was made at all).

But as the project continued to kick around Hollywood, Fincher accidentally was sent Walker's original script, with the ending intact. (Walker recently posted the script on his website.)

"[Fincher] expressed some interest, but in expressing his interest to them, had mentioned there was a head in the box," Walker tells Heat Vision. "And they were like, 'Oh, no, no, no. We sent you the wrong draft.' And then they sent him the vastly rewritten, Jeremiah Chechik draft, which had a completely different ending and Fincher said, 'No, I wouldn't be interested in doing that.'"

Fincher and Walker had their first meeting, and the screenwriter got out a notebook to write down all of the changes he assumed the director would be mandating, but Fincher told him to put his notepad away. They were just there to talk, not for Fincher to dictate.

It was the start of a friendship and professional relationship that would change Walker's life.

"He is one of the rare people who is respectful of every piece of material that comes across his purview," says Walker. "He's not a person that you hand the blueprints to a house and he says, 'OK, let's go make this into a boat.'"

Walker says he's still thankful that against the odds, that first draft of Seven landed on Fincher's desk. Had Walker not been so early in his career, he likely would not have been so amenable to making those changes Chechik asked him to make to Seven back when the Christmas Vacation director was attached to the project.

"As a writer, when you come on a project and you don't see eye to eye with the director…you have to make a choice whether you are going to stick around and rewrite stuff or perhaps feel like you are ruining your own material," says Walker, who says today he would be more likely to exit a project in favor of letting a director see out his or her own vision. "That said, had I told Jeremiah Chechik during the process of rewriting Seven, 'You know what, I don't really agree with getting rid of this stuff and changing the ending and setting it in a kind of burnt-out church, and getting rid of the head in the box, etc. So I quit.' If I had done that, I wouldn't have been around for the happenstance, luck, fate of Fincher receiving the wrong script. He might have gotten my script, but it would have been at least one, maybe several writers down the line, and he probably would have proceeded with those other writers."

Walker's latest project, Nerdland, is an unexpected bookend to Seven. The animated comedy from director Chris Prynoski stars Paul Rudd, Patton Oswalt, Hannibal Buress and Garfunkel and Oates' Riki Lindhome and Kate Micucci. It tells the story of roommates (an aspiring actor and aspiring screenwriter) in search of Hollywood fame, with it taking some inspiration from the lifestyle Walker was living when he was trying to get a foothold in the business.

For Walker, Se7en being optioned allowed him to quit his job at Tower Records and start supporting himself as a writer, even though it would be years before the film was made.

"It was optioned at the guild minimum. Which was a fine living compared to Tower Records. It wasn't 'F— you money,' obviously. But it was enough money for me to make the move from the east to the west and to get a Toyota. Not a Rolls. And to live the life that is very exactly portrayed in Nerdland, basically. To live in that tandem parking spot apartment in Los Feliz with a roommate," says Walker.

He and Fincher have continued to work together over the years, with Walker performing uncredited work on The Game and Fight Club, an adaptation of The Reincarnation of Peter Proud, and rewrites for The Girl Who Played With Fire and 20,000 Leagues Under the Sea.

"Every one of those writing experience with David, was the best experience you could possibly hope for, regardless of the fact that so many of them never got made. And I'm very lucky," says Walker.

Check out the trailer for Walker's Nerdland below, and learn more about it here.