MONTGOMERY, Ala. (AP) — A federal judge on Thursday questioned Alabama officials about the state’s lethal injection procedures — including how many needle “pokes” are too many — after problems with vein access at the state’s last two scheduled executions.

U.S. District Judge R. Austin Huffaker, Jr. put forth the questions during a court hearing in a lawsuit filed by Kenneth Eugene Smith, who is seeking to block his upcoming Nov. 17 execution. His attorneys have pointed to problems at recent lethal injections. Alabama called off a lethal injection last month after having trouble accessing the veins of the 351-pound (159-kilogram) inmate, and advocacy groups have alleged a July execution, carried out after a lengthy delay, was botched.

Huffaker asked an attorney for the state at what point is the search for a vein impacted by the constitutional ban on cruel and unusual punishment.

“It is 10 pokes? Is it 11? Is it 100? Is it one hour? … What is it?” Huffaker asked. He also asked when does the state make a decision to abort a lethal injection when there are problems obtaining a vein connection.

Robert Anderson, of the Alabama attorney general’s office, said the state prison commissioner and warden are in charge of the decision on when to call off an execution.

Huffaker also asked the state prison commissioner to clarify when the state will be ready to use nitrogen hypoxia, an execution method the state has authorized but never used. Huffaker said the state had told him different things at different times, including once suggesting that it could be ready for last month’s execution — a suggestion that turned out to be untrue.

“It’s being developed but we don’t have a protocol at this point,” Alabama Corrections Commissioner John Hamm told the judge.

Anderson added that Alabama is attempting to develop the country’s first procedures for execution by nitrogen hypoxia, so it is a complicated endeavor and difficult to estimate a precise time.

Smith, 57, is set to be executed by lethal injection at Holman Correctional Facility on Nov. 17 after being convicted in the 1988 murder-for-hire killing of Elizabeth Dorlene Sennett, a 45-year-old grandmother and pastor’s wife.

Smith’s attorney, Robert Grass, said Alabama’s lethal injection procedure creates the intolerable “risk of cruel and unusual punishment.” He also said the state has kept much of the process shrouded in secrecy, including the identities and qualifications of the people who connect the IV line to the inmate. Grass is seeking to obtain records from recent executions and to interview execution team members.

Alabama is asking the judge to dismiss Smith’s lawsuit, arguing that courts have long upheld the constitutionality of lethal injection.

Alabama last month called off the lethal injection of Alan Miller after being unable to access his veins. The state faced a midnight deadline to get the execution underway. Miller said in a court filing that prison staff poked him with needles for over an hour as they tried to find a vein. Miller’s attorneys are fighting the state’s effort to seek a new execution date for him.

The July execution of Joe Nathan James Jr. was carried out three hours after the U.S. Supreme Court said the state could proceed. The state acknowledged that establishing the intravenous line took longer than expected. However, Reprieve US Forensic Justice Initiative, a human rights group that opposes the death penalty, has maintained the execution was botched.

Witnesses to a private autopsy said that James’ body showed evidence that officials had attempted to perform a “cutdown,” a procedure in which the skin is opened to allow a visual search for a vein. They also speculated that he may have been given a sedative shot. The state said that a “cut down” is not part of their protocol and that James was not sedated.

Hamm, speaking under oath during the Thursday hearing, told the judge that during Smith’s execution that the state will not use a “cut down” procedure and will not give any sort of sedative shot.