State lawmakers in New York moved on Tuesday to implement new safeguards that will guarantee women can choose to have an abortion in case the landmark U.S. Supreme Court decision Roe v. Wade is overturned by a more conservative high court.

The New York State Senate and Assembly both passed what’s called the Reproductive Health Act, a bill long advocated for by Democrats in the Legislature that moves abortion from the state’s penal code to the public health law and expands abortion protections to women in the later stages of pregnancy.