When Edgar Wright left Marvel’s Ant-Man, the amount of speculation and discussion was crazy. Eventually, Peyton Reed was hired as the director after a rewrite by none other than Adam McKay. McKay, a big comic book fan, is best known for crazy comedies like Anchorman and Step Brothers, so him coming on to the film was a pretty big leap. How did that happen? Well, now we have a few more details.

Once Wright left, the film’s star – Paul Rudd – called McKay and asked him to do a rewrite. He agreed and Rudd himself helped him with the writing. Yes, for the first time (in a while) we have a Marvel Studios movie co-written by the star himself. Read more from McKay about the Ant Man script below.

McKay spoke to Collider about Ant-Man, and you can watch the full interview there. Here are the pertinent quotes.

On how he got involved:

[Rudd] called me when Edgar Wright stepped away from the project and told me what was going on. I went and met with Marvel, and I was a little dubious just because I’m friends with Edgar and I didn’t know what the story was, and then when I kind of heard what happened, that Edgar had parted ways, and then I saw their materials, I was like, ‘God this is pretty cool’. Ultimately I didn’t want to jump in as a director, I had too many other projects going and it was too tight, but I thought, ‘You know what, I can rewrite this, and I can do a lot of good by rewriting it.’

And on Rudd writing:

I’ve always known Paul Rudd’s a really good writer from improvising with him on set, but I had no idea he was that good—he’s really great with dialogue. So the two of us holed up in hotel rooms on the east and west coast, and I think it was like six to eight weeks we just ground it out and did a giant rewrite of the script. I was really proud of what we did, I really thought we put some amazing stuff in there and built on an already strong script from Edgar Wright and sort of just enhanced some stuff.

He also revealed he and Rudd added “a giant action sequence” but that a lot of Wright’s action, dialogue and character is all there:

We just shaped the whole thing, we just tried to streamline it, make it cleaner, make it a little bigger, a little more aggressive, make it funnier in places—we just basically did a rewrite. Edgar had a really good script. But we just had a blast, and Rudd was just so much fun to write with. I walked away saying, ‘Hey, you and I gotta write a script together.’

Pretty cool stuff. There’s more at the link too.

Paul Rudd is currently filming Ant-Man aimed at a July 17, 2015 release. Are you excited that he’s writing?