The Senate Intelligence Committee’s 500-page executive summary of its report on the CIA’s torture program offers some horrifying details about U.S. treatment of detainees captured in the post-9/11 years. It also highlights and adds some details about the important role two psychologists had in both developing the “enhanced interrogation” program and carrying it out.

Within the report, the duo in question are referred to with the pseudonyms “Grayson Swigert” and “Hammond Dunbar.” But both the New York Times and NBC News have identified them as Jim Mitchell and Bruce Jessen, two psychologists who have been previously singled out for their roles in developing and legitimizing the torture program.

Related Stories How Militarizing Police Can Increase Violence

Both men came from an Air Force background, where they worked on the Survival, Evasion, Resistance, and Escape (SERE) program in which military personnel are trained to resist enemy questioning by enduring oftentimes brutal mock interrogations. Beyond that, though, they seemed otherwise poorly suited for the task of interrogating al-Qaeda detainees. “Neither psychologist had any experience as an interrogator,” the report notes, “nor did either have specialized knowledge of al-Qa’ida, a background in counterterrorism, or any relevant cultural or linguistic expertise.” Despite their lack of experience in these key areas, Mitchell and Jessen “carried out inherently governmental functions, such as acting as liaison between the CIA and foreign intelligence services, assessing the effectiveness of the interrogation program, and participating in the interrogation of detainees in held in foreign government custody.”

So how did these two men come to play such an outsized role in developing and enacting the CIA’s torture program? Much of the story is captured in a 2009 Times article by Scott Shane. Shane writes that Mitchell, who after retirement “had started a training company called Knowledge Works” to supplement his income, realized that the post-9/11 military would provide business opportunities for those with his kind of experience and started networking with his contacts to seek them out.

Eventually, Shane writes, Mitchell got himself an audience with the CIA, won some of its members over with his toughness-infused ideas for dealing with terrorists, brought his old friend Jessen onboard, and developed a proposed interrogation method of dealing with al-Qaeda detainees that would grow into the frequently brutal program described in the Senate report summary. Shane writes that Mitchell participated in the 2002 CIA interrogation of Abu Zubaydah, al-Qaeda’s purported third in command, in Thailand:

With the backing of agency headquarters, Dr. Mitchell ordered Mr. Zubaydah stripped, exposed to cold and blasted with rock music to prevent sleep. Not only the F.B.I. agents but also C.I.A. officers at the scene were uneasy about the harsh treatment. Among those questioning the use of physical pressure, according to one official present, were the Thailand station chief, the officer overseeing the jail, a top interrogator and a top agency psychologist.

From there, the business would only grow. “In 2005,” the Senate report states, “the psychologists formed a company specifically for the purpose of conducting their work with the CIA. Shortly thereafter, the CIA outsourced virtually all aspects of the program.” And while the company’s contract was terminated in 2009 amid a growing national outcry over government-sanctioned torture, by then Mitchell and Jessen’s years-long relationship with the CIA had already proven extremely profitable. The Senate report notes:

In 2006, the value of the CIA’s base contract with the company formed by the psychologists with all options exercised was in excess of $180 million; the contractors received $81 million prior to the contract’s termination in 2009. In 2007, the CIA provided a multi-year indemnification agreement to protect the company and its employees from legal liability arising out of the program. The CIA has since paid out more than $1 million pursuant to the agreement.

One of the strangest subplots here is the unwitting role of Martin Seligman, a psychologist viewed as one of the leading modern researchers on human happiness. As the Times reported, Mitchell attended a small gathering at Seligman’s house two months after 9/11 conceived of as a brainstorming session to fight Muslim extremism. There he “introduced himself to Dr. Seligman and said how much he admired the older man’s writing on ‘learned helplessness.’ Dr. Seligman was so struck by Dr. Mitchell’s unreserved praise, he recalled in an interview, that he mentioned it to his wife that night.”

The concept of learned helplessness, a psychological phenomenon in which people who face persistent adversity effectively give up and lose the capacity to attempt to improve their situations — Seligman’s original research on the subject, from the 1960s, involved shocking dogs — was put to use by Mitchell and Jessen in their dealings with the CIA, and it echoes in the report: “SWIGERT had reviewed research on ‘learned helplessness,’ in which individuals might become passive and depressed in response to adverse or uncontrollable events. He theorized that inducing such a state could encourage a detainee to cooperate and provide information.” Many interrogation experts vehemently disagree: This level of detainee mistreatment, they argue, increases the risk that the subject will simply say whatever the interrogator wants to hear, leading to unreliable intelligence.

Seligman, for his part, has repeatedly expressed sorrow that his research was used in this manner. Reached via email by Science of Us, he responded with a statement that he’s used previously when questioned about his research’s role in the torture program: “I am grieved and horrified that good science, which has helped so many people overcome depression, may have been used for such bad purposes.”