The Senate passed legislation Wednesday to overhaul oversight and bring greater transparency to the crisis-plagued federal Bureau of Prisons following reporting from The Associated Press that exposed systemic corruption in the federal prison system and increased congressional scrutiny.

The Federal Prison Oversight Act, which the House passed in May, now goes to President Joe Biden to be signed into law. It establishes an independent ombudsman for the agency to field and investigate complaints in the wake of rampant sexual abuse and other criminal misconduct by staff, chronic understaffing, escapes and high-profile deaths.