The Doctor adds personality traits of historical figures to his program, and a dark alter ego emerges that fixates on Kes and threatens Voyager.
Hoping to improve his personality, the Doctor adds traits drawn from holographic versions of famous historical figures, including Gandhi and Lord Byron. The changes destabilize his program, and the darker sides of those personalities combine into a malicious alternate self that begins to take control.
At the same time, Kes grows close to Zahir, a member of a group of travelers the crew has met, and considers leaving the ship. The Doctor's dark persona attacks Zahir and paralyzes Torres when she discovers what is happening, then abducts Kes and leaps from a cliff with her. Both are beamed aboard in midfall, and the Doctor's program is restored to normal.
