Michigan Governor Rick Snyder this week signed a law that denies unemployment benefits to some people seeking jobs who fail drug tests.

A business that gives a prospective employee a drug test does not have to notify the state if the person fails. If the company chooses to share the information with the state, a person not hired because of a failed drug test will lose their unemployment check, according to the Associated Press. The law will be in effect for one year, as a pilot program, the AP reports.

A critic of the law, Michigan State Senator Coleman Young II, said, “If you were really interested in helping people gain employment, you wouldn’t kick them and their family off” unemployment. “You would offer them drug treatment so they can lead a sober life.”

States trying to require drug testing for welfare recipients are facing obstacles, including legal challenges and high costs.

In 2011, a federal judge halted a Florida law that required welfare applicants to pass a drug test before they could receive benefits. The ruling was in response to a lawsuit filed by the American Civil Liberties Union of Florida. A similar law passed in Georgia was suspended as a result of the ruling. Other state laws have been moderated in an effort to lower costs and avoid legal fights.

At least 29 states this year considered drug-testing measures for people receiving welfare, but only two measures passed. Since 2011, only nine states have passed drug-testing bills related to welfare, and at least six have passed bills related to unemployment benefits. Last year, Wisconsin repealed a law requiring employers to report failed tests.