For Star Trek Beyond, the third film in what is now known as the Kelvin Timeline of Trek lore, cast member Simon Pegg not only played Chief Engineer Montgomery Scott once again but also took on the job of co-writing the screenplay with Doug Jung. The results are much closer in spirit to the original series than 2013’s labored Star Trek Into Darkness, and a whole lot of fun as well, as the crew of the Enterprise is lured into a deadly trap in deep space by a crafty and brutal new enemy named Krall (Idris Elba).

With the entire main crew back for this adventure (including the late Anton Yelchin as Chekov in one of his last screen appearances), the top acting honors may once again go to Karl Urban, who effortlessly captures the voice and attitude of the beloved Dr. Leonard “Bones” McCoy. Both Pegg and Urban remain huge Trek fans as well, which we got to speak with them about, among other things, during a recent interview in Los Angeles.

Let me ask, because I’ve heard conflicting reports, which of you is the biggest Star Trek nerd? Like, the guy who can shoot out episode titles…

Karl Urban: (pointing to Pegg) This guy.

Simon Pegg: We’re both big fans. I hesitate to say “Trekkies” just because I think you have to earn that title. Trekkies is a word that’s bandied around so much to describe people who like Star Trek -- Trekkies know everything, you know. You have to earn those stripes. I’m a longtime, huge fan of Star Trek and so is Karl, but I mean, we’d probably have to go head to head in some weird challenge which we’d both embarrass ourselves in.

Star Trek Beyond - Jaylah (Sofia Boutella) and Scotty (Simon Pegg)

Would you agree with that?

Urban: Yeah, I would agree with that actually. When you actually meet a true Trekker or Trekkie -- and one springs to mind, (Access Hollywood film critic) Scotty Mantz -- that redefines your knowledge of Trek.

Pegg: You realize you know nothing.

Urban: Yeah.

Pegg: Doug and I used Memory Alpha during the writing process because it’s a fantastic resource. It’s a fan-run wiki which has everything on it. So if we needed to check the internal specs of a photon torpedo or see what year the first Warp 4 vessel launched, it’s all on there and it was nice to not just rely on my own knowledge.

Karl, how was it having the writer as part of the cast? Can you slip him a few bucks and, you know, get him to write you an additional scene?

Urban (laughs): I didn’t have to pay Simon, he did it for free, ‘cause he loves me (both laugh). You know what, it was great. Simon sent us an early draft and said, “Look, if you guys have any ideas or suggestions, let’s open the dialogue.” And that’s what we collectively as a cast did, and right throughout the shooting process we were working with Simon and with Doug to perfect the material and to make it as great as it could be. We were so lucky that I felt like he was a conduit for the cast to express themselves and as a result we get a much stronger film.

Karl Urban as Bones in Star Trek Beyond

We saw a nice expansion of Sulu’s character in this film and we’ve actually seen an expansion of his character before, in Star Trek VI, when he became a ship’s captain. If you continue this series, do each of you have something you’d like to see happen for Scotty and McCoy?

Pegg: I don’t know what Scotty’s ambitions are beyond the engine room of the starship Enterprise. He’s so happy down there. He’s probably the least changed of everybody -- he’s just doing his thing. I mean, what would Bones want, a nice practice?

Urban: There’s a few things I’d like to see. I’d like to see wild man Bones again, you know, when Bones turns up in (Star Trek) The Motion Picture and he’s this crazed, grizzly wild man. I’d love to get him to that point.

Pegg: You’re getting there.

Urban: I’m getting there, aren’t I? I’m growing this for the next film. Perhaps a love interest -- let’s see Bones get some action. That would be awesome.

He had a daughter in the original series…

Urban: He did, yeah.

She never appeared but she was mentioned. Does she exist in this timeline? Her name was Joanna.

Pegg: Well, he was married, right?

Urban: Yeah, he was married in our first Star Trek movie, yeah. We meet him and he’s freshly divorced, and yeah, he’s got a wife and daughter. Ex-wife.

Star Trek Beyond opens in U.S. theaters July 22, 2016.