Lawmakers in West Virginia have voted to use $24 million from opioid lawsuit court settlements to increase inpatient treatment beds available to addicts throughout the state.

The bill passed by the House and Senate and awaits Gov. Jim Justice’s signature. When passed, it will authorize the Department of Health and Human Resources to ensure that treatment beds are available in the most vulnerable populations across the state, providing much-needed treatment options to the people who need them most.

West Virginia, like many states, is in the midst of an opioid crisis. They had the highest overdose rate in the US in 2015. So in March 2016, they filed a lawsuit against 13 drugmakers, alleging that their recklessness and greed caused them to violate the nation’s drug laws. This, the government believes, is one of the top reasons that the opioid epidemic is still raging today.

“The epidemic still rages because the fines and suspensions imposed by the DEA do not change the conduct of the wholesale distribution industry,” the lawsuits filed in West Virginia said. “They pay fines as a cost of doing business in an industry which generates billions of dollars in annual revenue.”

The lawsuits intended to punish the companies enough that they think twice about their practices, or they’ll end up going broke in fines and lawsuits. Several distributors and other companies have already settled with the state.

“The purpose of these lawsuits is to make the economic cost of willfully violating the law so significant that we force the wholesalers to abide by the law,” said Paul Farrell Jr., the attorney who filed the initial lawsuits across the state on behalf of different counties.

Some of the companies plan to vigorously defend themselves in court, so there may be future payouts as well. The hope, however, is to reduce heroin addiction in the community, so there won’t be a need for even more beds in a few years.

For now, lawmakers say, each of the treatment beds will accept private, insurance or Medicaid payments and work closely with the drug court system to make sure that needed services are available to those in the system. An earlier version of the bill had called for 600 provision removed from the legislation that finally passed. The department has not yet decided how many beds or where they’ll be located.