This episode was written by D. C. Fontana(Dorothy Catherine Fontana). She also wrote many of the episodes for Star Trek: The Original Series and other shows. Gene Roddenberry advised Fontana to use only her initials as many in the networks back in those days were still biased against women.