the series, the writer introduced a set of "MI5 terminology", terms used by the main characters in the series. According to Oyelowo, Wolstencroft's scripts included more spy terms, stating "we curse David Wolstencroft often. His dialogue tends to be the most chewy," and the actors had to learn them as if they spoke as such on a daily basis. Brenton, meanwhile, adopted the same writing style based on early episodes of Taggart, a Scottish-based crime drama; the writer was impressed by the show's ability to add more to the plot halfway through. He also took inspirations from novels including le Carré's Tinker, Tailor, Soldier, Spy. Mirren wrote "One Last Dance", which he felt was difficult to write as he had to tie two main storylines together. Brenton and Wolstencroft collaborated to write "Lesser of Two Evils" due to timing constraints. Wolstencroft pitched the story, and then each writer wrote 30 pages of dialogue. The pilot originally underwent 30 rewrites and four separate story ideas before the BBC was satisfied with it. Similarly, the second episode went through four rewrites. After four episodes were written, the September 11 attacks took place, resulting in three thousand deaths in the United States. As a result, the episodes were rewritten to take account of the events to assure the audience that the show is about fighting terrorism. According to Wolstencroft, the attacks "sidewinded" the show, "perversely made it as relevant as can be," and "commuted a great sense of responsibility" on Spooks. Throughout the writing, and also the filming stages of the series, the writers were advised by ex-MI5 officers who gave insight into how the characters operate and how their personal lives would be affected by it. Among the advisors were Nick Day, who worked in counter-terrorism in the Security Services, Viktor Abramkin, a UK-based former KGB officer, and Mike Baker, an ex-CIA agent. When including terrorists, the BBC often has the responsibility to portray people with as much balance as possible for both sides. The first series finale was heavily researched, as the episode was based on real life instances in which terrorists agreed to work with the authorities in Colombia. Meanwhile, a scene in which Tom and Patrick strip naked to ensure they are not bugged came from the producers' sources. The sources also advised the producers how to tail targets without being spotted. The second episode included the death of