During the early 1990s, Damon and Affleck wrote Good Will Hunting (1997), a screenplay about a young mathematics genius, an extension of a screenplay he wrote for an assignment at Harvard, having integrated advice from director Rob Reiner, screenwriter William Goldman, and writer/director Kevin Smith. He asked Affleck to perform the scenes with him in front of the class and, when Damon later moved into Affleck's Los Angeles apartment, they began working on the script more seriously. The film, which they wrote mainly during improvisation sessions, was set partly in their hometown of Cambridge, and drew from their own experiences. They sold the screenplay to Castle Rock in 1994, but after a conflict with the company, they convinced Miramax to purchase the script. The film received critical praise; Quentin Curtis of The Daily Telegraph found "real wit and vigour, and some depth" in their writing and Emanuel Levy of Variety wrote of Damon's acting, "[he] gives a charismatic performance in a demanding role that's bound to catapult him to stardom. Perfectly cast, he makes the aching, step-by-step transformation of Will realistic and credible. " It received nine Academy Awards nominations, including Best Actor for Damon; he and Affleck won Oscars and Golden Globe Award for Best Screenplay. He and Affleck were each paid salaries of $600,000, while the film grossed over $225 million at the worldwide box office. The two later parodied their roles from the film in Kevin Smith's 2001 movie Jay and Silent Bob Strike Back.