Terrance Dicks worked together with Malcolm Hulke on scripts for The Avengers as well as other series before becoming Assistant, and later full Script Editor of Doctor Who from 1968. Dicks worked on the entirety of the Jon Pertwee Third Doctor era of the programme, and returned as a writer - scripting Tom Baker's first story as the Fourth Doctor: Robot. His later script writing credits on Doctor Who included the 20th anniversary story The Five Doctors. Terrance Dicks novelised many of the original Doctor Who stories for Target books, and has written original Doctor Who novels for BBC Books. Robert Holmes served with distinction in the army and also in the police before becoming a journalist and television writer. Holmes went on to become one of the Doctor Who's most prolific writers. He took over as Script Editor of Doctor Who in 1974 during one of the programme's most successful periods at the start of the Fourth Doctor's era, and established a background and society for the Time Lords that has endured to this day. Robert Holmes wrote for many other series including Doomwatch, Spy Trap, Dixon of Dock Green, Blake's 7 and many others. Holmes died in 1986, while working on the final episodes of the Doctor Who story The Trial of a Time Lord.