When he was arrested, the man accused of killing nine people during a Bible study in a Charleston church had a list of other local black churches in his car, law enforcement officials testified on Monday.

During roughly two hours on the stand, former state law enforcement division agent Brittany Burke testified that names of a handful of other churches and their addresses were found on a handwritten list in a backpack in Dylann Roof’s car.

Also on papers found in Roof’s car were phone numbers for the statehouse complex in Columbia, as well as the name of Denmark Vesey, one of the founders of Charleston’s Emanuel AME Church.

Vesey led a failed 1822 slave rebellion that drove the church underground. After the plot was reported, Vesey was hanged and the church was burned. The church was rebuilt, but in 1834 all-black churches were banned and members worshipped “underground” until 1865, when Emanuel AME Church was formally reorganized.

Burke is one of the state agents who processed evidence found in Roof’s car when he was arrested after the June 2015 shootings at the church known as Mother Emanuel. A jury began last week hearing testimony against Roof, 22, who is on trial on 33 federal charges, including hate crimes and obstruction of the practice of religion.

Roof has formally entered a not guilty plea to all the charges in federal court. But his attorneys have said he’s willing to change that to guilty if prosecutors agree not to seek the death penalty against him.

In his videotaped, two-hour confession played for jurors last week, Roof told FBI agents he left bullets in a magazine so that he could kill himself after the slayings but changed his mind when he didn’t see any police immediately after the shooting.

“Oh no. I was worn out,” Roof said when an agent asked if he thought about killing more black people.

Evidence shown in photographs introduced Monday showed Roof was essentially living in his car. Recovered from his black sedan were multiple items of clothing, food, beverages and an empty liquor bottle. There were also multiple travel brochures, a cellphone, a laptop and a burned American flag.

Prosecutors also questioned a witness who detailed the process of Roof’s gun purchase. Ronnie Thrailkill, manager of Shooter’s Choice in West Columbia, testified that a typical background check was done on Roof when he came in to buy a Glock .45-caliber handgun in April 2015, two months before the shootings.

At that time, Thrailkill testified, Roof filled out the standard paperwork required by federal law and left to wait out a three-day waiting period to allow time for background checks. States can add more time on to that window, but no such efforts have passed the state legislature.

Roof had been arrested for drugs two months earlier, but Lexington County sheriff Jay Koon told the Associated Press after the shootings that a jail clerk had entered incorrect information that wasn’t ever fixed in a state database.

When Roof sought to buy the gun, an FBI examiner spotted the arrest but because of the error called the wrong agency to get his record. Without the necessary documents, the purchase had to go through after three days, and Roof came back for his gun.

Victims’ families are suing the FBI for negligence in allowing the sale. FBI director James Comey has said Roof should have never been allowed to buy the gun and promised a full review.

Federal prosecutors have said they could wrap up their case as early as Wednesday. Acknowledging the role of Roof in the shootings, his defense team has been more focused on the penalty phase of the trial that will determine whether Roof faces life in prison or the death penalty if convicted.