
    UNITED STATES of America, Plaintiff-Appellee, v. Sabil M. MUJAHID, Defendant-Appellant.
    Nos. 11-30276, 12-30070.
    United States Court of Appeals, Ninth Circuit.
    Argued and Submitted June 2, 2014.
    Submission Vacated Oct. 23, 2014.
    Resubmitted and Filed Aug. 27, 2015.
    
      John P. Balazs (argued), Law Office of John P. Balazs, Sacramento, CA, for Defendant-Appellant.
    Jo Ann Farrington (argued), Assistant United States Attorney; Karen Loeffler, United States Attorney, United States Attorney’s Office, Anchorage, AK, for Plaintiff-Appellee.
    Before: J. CLIFFORD WALLACE, KIM McLANE WARDLAW, and MORGAN CHRISTEN, Circuit Judges.
   OPINION

CHRISTEN, Circuit Judge:

Sexual assault by and against prison inmates is a distressing and pernicious problem. In this case, we decide whether the Constitution gives Congress the power to address it by criminalizing sexual assaults in facilities where federal inmates are held by agreement with state and local governments. We also decide whether the existence of such an agreement is a question of law that may be decided by the trial court. Our answer to both questions is “yes.”

BACKGROUND

On March 5, 2009, Sabil Mumin Mujahid was arrested in Anchorage, Alaska after officers found a firearm in the trunk of a car he had driven to the Nesbett Courthouse for a bail hearing on a pending state drug charge. Mujahid was taken to the Anchorage Correctional Complex, which provides housing for state prisoners as well as federal prisoners pursuant to a contract with the U.S. Marshals Service.

The day after his arrest, Mujahid was charged in a federal criminal complaint with one count of being a felon in possession of a firearm. The federal court ordered him detained pending trial, and thereafter the state court revoked his bail on the drug charge. In June 2009, a jury convicted Mujahid on the federal felon-in-possession charge. The federal court sentenced Mujahid to 120 months’ imprisonment. On June 28, 2010 — after the state drug charge was resolved — Mujahid was transferred from the Anchorage Correctional Complex to a federal prison in Washington state.

During his time at the Anchorage Correctional Complex, Mujahid repeatedly. sexually assaulted other prisoners. As a result, he was charged with multiple counts of aggravated sexual abuse, sexual abuse, and abusive sexual contact, in violation of 18 U.S.C. §§ 2241, 2242, and 2244, respectively.

18 U.S.C. § 2241 defines and proscribes aggravated sexual abuse by any person “in the special maritime and territorial jurisdiction of the United States or in a Federal prison, or in any prison, institution, or facility in which persons are held in custody by direction of or pursuant to a contract or agreement with the head of any Federal department or agency.” (Emphasis added.) 18 U.S.C. §§ 2242 and 2244 define and proscribe sexual abuse and abusive sexual contact, respectively, under the same circumstances.

Before trial, Mujahid moved to dismiss the indictment on the ground that the “the Constitution does not confer upon the National Government the power to suppress violent crime that occurs in state jails.” He argued that 18 U.S.C. §§ 2241, 2242, and 2244 exceed Congress’ authority under Article I of the Constitution and contravene the Tenth Amendment, both “facially and as applied.” Mujahid did not explain, however, why the statutes would be unconstitutional as applied to him if they are constitutional on their face.

The district court denied Mujahid’s motion to dismiss. In April 2011, the government filed a second superseding indictment, which added additional counts under the same statutes. The parties stipulated that the district court’s order on the motion to dismiss applied to all counts in the second superseding indictment.

Mujahid was tried before a jury in June 2011. At trial, Deputy U.S. Marshal Rochelle Liedike testified on behalf of the government concerning the Anchorage Correctional Complex. Liedike explained that there are no federal prisons in Alaska, but that the U.S. Marshals Service has a contract with the Alaska Department of Corrections to house federal prisoners. Liedike testified that the majority of federal inmates in Alaska are detained at the Anchorage Correctional Complex, where the Marshals Service has contracted for 60 beds. She authenticated a copy of the contract, which was introduced into evidence as Exhibit 23. Liedike confirmed that the contract was in effect from May 3, 2009, through May 26, 2010 — the period during which the events charged in the second superseding indictment took place.

At the end of the trial, the district court told counsel that it would use the Ninth Circuit Pattern Jury Instructions to instruct the jury that the government must prove beyond a reasonable doubt that “the offense was committed at the Anchorage Correctional Complex.” Mujahid objected, arguing that the jury should also have to determine whether the Anchorage Correctional Complex is “a facility in which persons are held in custody by direction of or pursuant to a contract or agreement with the head of any Federal department or agency.” See 18 U.S.C. §§ 2241, 2242, 2244. The district court overruled this objection, stating “the existence of the contract is a legal question for the Court to decide, and the fact question that’s for the jury to decide is simply was the victim housed in, you know, the institution.” The court subsequently granted the government’s unopposed motion for a legal finding on the record, and “conclude[dj that, as a matter of law, the Anchorage Correctional Complex is a facility in which persons are held in custody pursuant to an agreement with the United States Marshals Service, a federal agency.”

Mujahid was convicted of four counts of aggravated sexual abuse in violation of 18 U.S.C. § 2241 and three counts of abusive sexual contact in violation of 18 U.S.C. § 2244. The district court sentenced him to 480 months’ imprisonment. Mujahid timely filed a notice of appeal from the judgment in September 2011.

Four months later, Mujahid filed a pro se motion for a new trial in district court. Mujahid argued that the government withheld evidence, namely, a memorandum letter and remand detainer that “could have showed that comity was with the State of Alaska at the time of the allege[d] assault on John Doe 3 and John Doe 6.” Mujahid contended that after he was convicted on the federal felon-in-possession charge, the federal government transferred “custody back to the State of Alaska” so Mujahid could be tried on the state drug charges. The district court correctly determined that while it did not have jurisdiction to grant the motion absent a remand from this court, it did have jurisdiction to deny the motion. See United States v. Hays, 454 F.2d 274, 275 (9th Cir.1972) (per curiam). The court ruled it would decline to seek a remand “when defendant is currently represented by counsel.” Mujahid filed a second notice of appeal from the order denying his pro se motion for a new trial. We sua sponte consolidated Mujahid’s two appeals.

JURISDICTION AND STANDARD OF REVIEW

We have jurisdiction under 28 U.S.C. § 1291. We review de novo whether a criminal statute is an unconstitutional overreach of congressional authority. United States v. Bohn, 622 F.3d 1129, 1133 (9th Cir.2010). We also review de novo whether the district court’s jury instructions omitted an element of the charged offense. United States v. Cherer, 513 F.3d 1150, 1154 (9th Cir.2008).

DISCUSSION

Mujahid raises two arguments in this appeal. First, he argues the district court erred by denying his motion to dismiss the indictment because the statutes of conviction are unconstitutional. Second, he argues that whether the Anchorage Correctional Complex is a facility in which persons are held pursuant to a contract with the head of a federal agency is a question of fact that should have been determined by the jury, not the trial judge. We address each issue in turn.

I. The district court correctly denied Mujahid’s motion to dismiss the indictment.

A. The challenged statutes are not facially unconstitutional.

As originally enacted in 1986, the statutes of conviction proscribed aggravated sexual abuse, sexual abuse, and abusive sexual contact by any person “in the maritime and territorial jurisdiction of the United States or in a Federal prison.” Sexual Abuse Act of 1986, Pub. L. No. 99-654, 100 Stat. 3660 (codified as amended at 18 U.S.C. §§ 2241-2244). In, 2003, Congress passed the Prison Rape Elimination Act, which contained measures designed to reduce the widespread incidence of sexual assault in prisons, such as grants to states for prevention of prison rape and the establishment of a National Prison Rape Reduction Commission. Prison Rape Elimination Act of 2003, Pub. L. No. 108-79,117 Stat. 972. Then, in 2006, Congress expanded the jurisdictional reach of the statutes of conviction to include offenses “in any prison, institution, or facility in which persons are held in custody by direction of or pursuant to a contract or agreement with the Attorney General.” Violence Against Women and Department of Justice Reauthorization Act of 2005, Pub. L. No. 109-162, § 1177(a), 119 Stat. 2960, 3125 (2006) (codified as amended at 18 U.S.C. §§ 2241-2244).

This 2006 amendment is the focus of Mujahid’s constitutional claim. Mujahid argues the “police power” belongs to the states, and Congress acted beyond its limited, enumerated powers when it extended the statutory reach to cover sexual abuse that occurs in state and local institutions where federal detainees are held pursuant to a contract with a federal agency. The government responds that the 2006 amendment was a proper exercise of Congress’ authority to pass “necessary and proper” laws concerning federal prisoners.

In evaluating Mujahid’s claim, we are mindful that Mujahid bears a “heavy burden” to demonstrate the statutes are not within the scope of Congress’ constitutional authority. See United States v. Salerno, 481 U.S. 739, 745, 107 S.Ct. 2095, 95 L.Ed.2d 697 (1987). The Supreme Court has explained that “[a] facial challenge to a legislative Act is ... the most difficult challenge to mount successfully, since the challenger must establish that no set of circumstances exists under which the Act would be valid.” Id.; see also Hotel & Motel Ass’n of Oakland v. City of Oakland, 344 F.3d 959, 971 (9th Cir.2003) (explaining Salerno is the standard for demonstrating a statute is facially unconstitutional “outside the context of the First Amendment”).

“[T]he Necessary and Proper Clause grants Congress broad authority to enact federal legislation.” United States v. Comstock, 560 U.S. 126, 133, 130 S.Ct. 1949, 176 L.Ed.2d 878 (2010). In general, a statute is within the scope of Congress’ authority as long as it “constitutes a means that is rationally related to the implementation of a constitutionally enumerated power.” Id. at 134, 130 S.Ct. 1949; see also United States v. Kebodeaux, — U.S. -, 133 S.Ct. 2496, 2503, 186 L.Ed.2d 540 (2013). Thus, although “ ‘Congress cannot punish felonies generally,’ ” Bond v. United States, — U.S. -, 134 S.Ct. 2077, 2086, 189 L.Ed.2d 1 (2014) (quoting Cohens v. Virginia, 19 U.S. 264, 6 Wheat. 264, 428, 5 L.Ed. 257 (1821)), it is well established that Congress may create federal crimes under the Necessary and Proper Clause, see Comstock, 560 U.S. at 135-36, 130 S.Ct. 1949. Indeed, Mujahid forthrightly acknowledges that “Congress routinely exercises its authority to enact criminal laws in furtherance of, for example, its enumerated powers to regulate interstate and foreign commerce, to enforce civil rights, ... and so forth.” See id. at 136, 130 S.Ct. 1949. Mujahid also acknowledges that as a corollary to its power to enact federal criminal laws, Congress may establish a prison system and “enact laws that seek to ensure that system’s safe and responsible administration [as well as] the safety of the prisoners, prison workers and visitors, and those in surrounding communities.” Id. at 137, 130 S.Ct. 1949.

In Comstock, applying these principles, the Supreme Court upheld a federal civil-commitment statute authorizing the continued detention of “a mentally ill, sexually dangerous federal prisoner beyond the date the prisoner would otherwise be released.” Id. at 129, 130 S.Ct. 1949 (citing 18 U.S.C. § 4248). The Court concluded the statute was “a ‘necessary and proper’ means of exercising the federal authority that permits Congress to create federal criminal laws, to punish their violation, to imprison violators, to provide appropriately for those imprisoned, and to maintain the security of those who are not imprisoned but who may be affected by the federal imprisonment of others.” Id. at 149, 130 S.Ct. 1949. In reaching this conclusion, the Court considered five factors: “(1) the breadth of the Necessary and Proper Clause, (2) the long history of federal involvement in this arena, (3) the sound reasons for the statute’s enactment in light of the Government’s custodial interest ..., (4) the statute’s accommodation of state interests, and (5) the statute’s narrow scope.” Id. Mujahid argues these factors cut in the direction of unconstitutionality in this case. We disagree.

First, as we have explained, the Necessary and Proper Clause grants Congress broad power to enact legislation, including legislation designed to facilitate appropriate enforcement of federal criminal laws enacted in furtherance of Congress’ enumerated powers. See id. at 133-37, 130 S.Ct. 1949.

Second, Congress has long been involved in legislating the terms of federal imprisonment. See Ex parte Karstendick, 93 U.S. 396, 398-401, 3 Otto 396, 23 L.Ed. 889 (1876). Mujahid urges us to focus specifically on the federal government’s involvement in proscribing sexual abuse at state or local prisons. But in Comstock, the Court looked not to the history of the particular statute at issue in that case, but rather to the broader history of federal involvement “in the delivery of mental health care to federal prisoners,” including through civil commitment. 560 U.S. at 137-38, 130 S.Ct. 1949. Here, the federal government has been directly involved in the safe and orderly incarceration of federal prisoners since at least 1891, when the federal prison system was established. Congress enacted 18 U.S.C. §§ 2241, 2242, and 2244 to aid “the Federal Government’s obligation to maintain order within prisons.” See H.R.Rep. No. 99-594, at 12 (1986), reprinted in 1986 U.S.C.C.A.N. 6186, 6192. The 2006 amendment extending jurisdiction over offenses that take place in state facilities where federal prisoners are housed strikes us as a “modest addition to a longstanding federal statutory framework.” See Comstock, 560 U.S. at 142, 130 S.Ct. 1949.

Third, the statutes here, like the civil commitment statute in Comstock, are “ ‘reasonably adapted’ to Congress’ power to act as a responsible federal custodian.” Id. at 143, 130 S.Ct. 1949 (quoting United States v. Darby, 312 U.S. 100, 121, 61 S.Ct. 451, 85 L.Ed. 609 (1941)). Congress has found a “high incidence of sexual assault within prisons,” which has numerous detrimental effects on both inmates and the broader community. See 42 U.S.C. § 15601. Congress has a strong interest in and obligation to create a safe environment for federal prisoners and those housed with federal prisoners, including by preventing sexual assaults. To do anything less would risk denying prisoners their Eighth Amendment rights. See id. (explaining sexual assault within prisons “involves actual and potential violations .of the United States Constitution”); Farmer v. Brennan, 511 U.S. 825, 832-34, 114 S.Ct. 1970, 128 L.Ed.2d 811 (1994) (prison official’s deliberate indifference to substantial risk of serious harm violates prisoners’ right to be free from cruel and unusual punishment). Mujahid argues the statutes are unnecessary because all fifty states criminalize sex offenses. ■ But even if this is true, there is no guarantee a state will choose to prosecute an offense committed by or against a federal prisoner that occurs in a state prison, and at any rate, Congress’ power is not dependent on state inaction. See Comstock, 560 U.S. at 134, 130 S.Ct. 1949 (Congress may enact laws “rationally related to the implementation of a constitutionally enumerated power”).

Fourth, although the statutes at issue do not expressly accommodate state interests, the government correctly observes that they “do not supplant State legislation addressing the same topic; rather, like many federal criminal statutes, they create concurrent and complementary jurisdiction.”

Finally, the links between the statutes and an enumerated Article I power “are not too attenuated.” See id. at 146, 130 S.Ct. 1949. As we have explained, Congress may enact criminal laws to implement its enumerated powers, as well as other laws to ensure the just punishment of those convicted under federal criminal laws. Mujahid points out that the statutes “cover offenses committed by state inmates, state employees, and persons who visit inmates in state custody at any institution where federal inmates are held” pursuant to a contract with a federal agency. But this case involves a crime committed by a federal inmate, not a crime committed by one state inmate against another. Even assuming Congress could not authorize federal jurisdiction over the latter scenario, the statutes are not so over-broad as to completely exceed Congress’ power under the Necessary and Proper Clause. See Salerno, 481 U.S. at 745, 107 S.Ct. 2095.

Like the civil commitment statute in Comstock, 18 U.S.C. §§ 2241, 2242, and 2244 are not facially unconstitutional; they are “a ‘necessary and proper’ means of exercising the federal authority that permits Congress to create federal criminal laws, to punish their violation, to imprison violators, to provide appropriately for those imprisoned, and to maintain the security of those who are not imprisoned but who may be affected by the federal imprisonment of others.” See Comstock, 560 U.S. at 149, 130 S.Ct. 1949.

B. Mujahid has not shown the statutes are unconstitutional as applied to him.

In his opening brief on appeal, Mujahid argues the statutes of conviction maybe unconstitutional as applied to him because “the State of Alaska may have had primary custody and jurisdiction over him since his initial arrest.” He seeks remand to the district court for this determination. In response, the government correctly points out that although Mujahid’s motion to dismiss the indictment nominally challenged the constitutionality of the statutes “facially and as applied,” it did not indicate that Mujahid might be in state custody or otherwise articulate any facts that would support an as-applied challenge to the statutes. Mujahid replies that the “as-applied” challenge raised in the motion to dismiss is based on his status as “a federal pre-trial detainee being held with mostly state inmates at the Anchorage Correctional Complex pursuant to a contract with the U.S. Marshals Service.” He contends this is a “separate and distinct” argument from his post-trial, pro se claim that the state had primary custody over him.

Mujahid thus effectively concedes that the motion to dismiss the indictment did not articulate an as-applied challenge; it was premised on the assumption that Mujahid was a federal detainee. For the reasons set forth in the previous section, 18 U.S.C. §§ 2241, 2242, and 2244 are plainly constitutional as applied to an individual in federal custody who is being held in a state facility pursuant to a contract with a federal agency.

Until he filed his pro se motion for a new trial, Mujahid did not raise the argument that he may have been in state custody when the assaults took place. Because Mujahid was represented by counsel, the district court acted within its discretion by declining to seek a remand in order to consider this argument. See United, States v. Bergman, 813 F.2d 1027, 1030 (9th Cir.1987) (“A criminal defendant does not have an absolute right to both self-representation and the assistance of counsel. The decision to allow such hybrid representation is within the sound discretion of the [trial] judge.” (citation omitted)). The district court did not rule on Mujahid’s as-applied challenge. We also decline to do so. See Davis v. Nordstrom, Inc., 755 F.3d 1089, 1094 (9th Cir.2014) (explaining federal appellate court will “not consider an issue not passed upon below” when record has not been fully developed (internal quotation marks omitted)).

II. The district court properly decided the jurisdictional component of the statutes of conviction as a matter of law.

Mujahid argues the district court erred by deciding as a matter of law that the Anchorage Correctional Complex is a “facility in which persons are held in custody ... pursuant to a contract or agreement with the head of any Federal department or agency,” see 18 U.S.C. §§ 2241, 2242, 2244, and instructing the jury that it need only determine whether the crimes in fact occurred at the Anchorage Correctional Complex. Mujahid relies primarily on United States v. Gaudin, 515 U.S. 506, 115 S.Ct. 2310, 132 L.Ed.2d 444 (1995).

In Gaudin, the defendant was convicted of making material false statements in a matter within the jurisdiction of a federal agency, in violation of 18 U.S.C. § 1001. Id. at 507, 115 S.Ct. 2310. The district court concluded, based on testimony proffered by the government, that the alleged false statements were material, and it so instructed the jury. Id. at 508,-115 S.Ct. 2310. The Supreme Court concluded the district court violated the defendant’s Fifth and Sixth Amendment right to have the jury determine each element of the crime beyond a reasonable doubt. Id. at 522-23, 115 S.Ct. 2310. The Court rejected the government’s argument that the Constitution requires the jury to determine only the facts underlying the materiality determination. Id. at 514, 115 S.Ct. 2310 (“[T]he jury’s constitutional responsibility is not merely to determine the facts, but to apply the law to those facts and draw the ultimate conclusion of guilt or innocence.”).

After Gaudin, we have approved of the trial court deciding the jurisdictional component of a crime to the extent it presents a pure question of law with no disputed questions of fact underlying it. See, e.g., United States v. Smith, 282 F.3d 758, 767 (9th Cir.2002) (“A district court may determine as a matter of law the existence of federal jurisdiction over [a] geographic area, but the locus of the offense within that area is an issue for the trier of fact.” (quoting United States v. Warren, 984 F.2d 325, 327 (9th Cir.1993)) (internal quotation marks omitted)). Thus, for example, in United States v. Perlaza, we held that the Maritime Drug Law Enforcement Act was unconstitutional insofar as it required the district court to determine a jurisdictional component — whether a vessel was stateless — that turned on disputed questions of fact. 439 F.3d 1149, 1165-67 (9th Cir.2006). By contrast, in United States v. Zakharov, we held the district court could decide the jurisdictional component — whether a vessel was subject to the United States’ jurisdiction where the flag nation had given its consent — because the issue did riot turn on disputed questions of fact. 468 F.3d 1171, 1176 & n. 3 (9th Cir.2006).

Similarly, we have held that the “existence of [a] contract based on undisputed facts is a question of law.” Chateau des Charmes Wines Ltd. v. Sabate USA Inc., 328 F.3d 528, 530 (9th Cir.2003) (per curiam) (citing Helash v. Ballard, 638 F.2d 74, 75 (9th Cir.1980) (per curiam)). Here, there is no factual dispute concerning the existence of a contract between the U.S. Marshals Service and the Alaska Department of Corrections to house federal prisoners at the Anchorage Correctional Complex. Mujahid’s opening brief does not point to any facts that would undermine the validity of the specific written contract introduced by the government at trial. We conclude, therefore, that the existence of this contract is .a question of law, as there is no factual question for the jury to decide. Cf. id. (“[Wjhether the parties agreed to a forum selection clause is a question of law[.]”). .

Mujahid argues that it was error for the district court not to let the jury make this determination because it involves a mixed question of law and fact, as in Gaudin. He further contends that the statutory language requires the government to prove not only the existence of a contract or agreement, but also that at least one federal inmate (and perhaps more, depending on how “persons” is read) was in fact held in custody at the facility at the time of the crime. We are persuaded that the more natural reading is that the government must simply prove there is an effective contract or agreement to hold federal detainees in custody, and that where, as here, the facts are undisputed, the trial court may make this determination. See id.

Moreover, even if we were to conclude it was error for the district court to decide as a matter of law that the Anchorage Correctional Complex is a facility in which persons are held in custody pursuant to an agreement with the U.S. Marshals Service, we would conclude that any error was harmless based on the contract and testimony proffered by the government at trial. See United States v. Thongsy, 577 F.3d 1036, 1043 (9th Cir.2009) (“An error ... omitting an element of the offense in a jury instruction is harmless if it is ‘clear beyond a reasonable doubt that a rational jury would have found the defendant guilty absent the error.’ ” (quoting Neder v. United States, 527 U.S. 1, 18, 119 S.Ct. 1827, 144 L.Ed.2d 35 (1999))).

In sum, we hold that in prosecutions under 18 U.S.C. §§ 2241, 2242, and 2244, the district court may determine as a matter of law whether the facility at which the alleged crime took place is one “in which persons are held in custody by direction of or pursuant to a contract or agreement with the head of any Federal department or agency.” The question whether the crime occurred at the facility must be submitted to the jury, as it was here.

CONCLUSION

For the foregoing reasons, we AFFIRM Mujahid’s convictions. 
      
      . A grand jury indicted him on this charge twelve days later.
     
      
      . We later affirmed the judgment of conviction and the sentence. See United States v. Mujahid, 433 Fed.Appx. 559 (9th Cir.2011).
     
      
      . The pattern jury instructions for 18 U.S.C. §§ 2241, 2242, and 2244 state that the jury must find "the offense was committed at [specify place of federal jurisdiction}.’’ See Ninth Circuit Pattern Criminal Jury Instructions §§ 8.164, 8.170, 8.179. The comments to Instruction 8.164 explain: “Whether the crime alleged occurred at a particular location is a question of fact. Whether the location is within the special maritime and territorial jurisdiction of the United States or a federal prison is a question of law.” The comments do not address the provision concerning facilities where federal detainees are held pursuant to a contract, which was added to the statute relatively recently.
     
      
      . Prior to 1986, federal law criminalized rape occurring in the special territorial jurisdiction of the United States. The Sexual Abuse Act of 1986 was designed to ensure the federal government had jurisdiction over sex offenses occurring in prisons not located within the United States’ special territorial jurisdiction. See H.R.Rep. No. 99-594, at 12 (1986), reprinted. in 1986 U.S.C.C.A.N. 6186, 6192.
     
      
      . As an example of a law designed to ensure prison safety, Comstock cited 18 U.S.C. § 1791, a statute that prohibits smuggling of contraband. See Comstock, 560 U.S. at 137, 130 S.Ct. 1949. That statute contains a jurisdictional provision virtually identical to the jurisdictional provision in the statutes here. See 18 U.S.C. § 1791(d)(4) (defining “prison” to include "any prison, institution, or facility in which persons are held in custody by direction of or pursuant to a contract or agreement with the Attorney General”).
     
      
      . Until the 1900s, there were no federal prisons, so all federal prisoners were housed in state facilities. See Howe v. Smith, 452 U.S. 473, 483, 101 S.Ct. 2468, 69 L.Ed.2d 171 (1981). In the 1800s, Congress gave the federal courts and later the Attorney General broad authority to assign federal prisoners to a suitable prison. See Cosgrove v. Smith, 697 F.2d 1125, 1135-36 (D.C.Cir.1983). Federal law provided that federal prisoners would be subject to the same conditions as state prisoners. See id. at 1136.
     
      
      . We emphasize that we do not decide this question.
     
      
      . Because we decide the statutes are constitutional under the Necessary and Proper Clause, we need not consider the government's alternative Spending Clause argument.
     
      
      . There is no dispute that the assaults took place after Mujahid was federally indicted and ordered detained pending trial on the federal charge.
     
      
      . The district court remains free to reconsider this issue upon an appropriate motion.
     
      
      . In his reply brief, Mujahid speculates without any evidentiary support that the agreement may not have been with the "head” of the U.S. Marshals Service, and that it may not have been in effect when the crimes occurred. We conclude Mujahid waived these arguments by failing to raise them before the district court and in his opening brief on appeal. See Trigueros v. Adams, 658 F.3d 983, 988 (9th Cir.2011) ("Ordinarily, arguments not raised before the district court are waived on appeal.”); Smith v. Marsh, 194 F.3d 1045, 1052 (9th Cir.1999) ("[0]n appeal, arguments not raised by a party in its opening brief are deemed waived.”).
     
      
      . Mujahid would have us treat the question of the existence of a contract like the requirement in a federal bank robbery prosecution that the government prove the bank is FDIC-insured to the jury, even if the facts are undisputed. See United States v. James, 987 F.2d 648, 650 (9th Cir.1993) (whether a bank is FDIC-insured is a question of fact for the jury). But we cannot treat the question here as one of fact in all instances, because we have held that- — at least when facts are undisputed — contract formation is a question of law. Chateau des Charmes Wines Ltd., 328 F.3d at 530. Because that precedent resolves this case, we need not determine whether the question here is always a question of law, as in our recent decision in United States v. Zepeda, No. 10-10131, 2015 WL 4080164, at *1 (9th Cir. July 7, 2015) (en banc) (concluding that, under the Indian Major Crimes Act, the trial judge should determine as a matter of law whether a defendant's alleged tribe is federally recognized, since such recognition is "a political decision made solely by the federal government and expressed in authoritative administrative documents”). Although Zepeda may well suggest that the question here, like the question there, can be decided by the trial court even if facts are disputed, we need not resolve that issue. Nor do we need to resolve any apparent tension between Zepeda and James.
      
     