After years of trying, House Republicans were able to pass legislation Thursday that would repeal and replace the Affordable Care Act. The GOP-proposed American Health Care Act squeaked by the house with a 217-213 vote, and now heads to the Senate.

But despite what’s being hailed as a victory for both the Trump administration and the GOP, not everybody is thrilled with the AHCA. Many, including House Minority Leader Nancy Pelosi, are pointing to the MacArthur Amendment as a key problem with the proposed plan.

The MacArthur Amendment, named after its author, Republican House member Tom MacArthur, allows states to opt out of several ACA insurance regulations.

Pelosi suggested Thursday that “Trumpcare eviscerates essential health benefits” and “guts protections for people with pre-existing conditions.”

Some of the of these pre-existing conditions include pregnancy, maternity and newborn care, rehab services and devices for people with disabilities, and substance abuse and mental health services.

If passed by the Senate, the AHCA would be yet another major change in the long history of the country’s mental health care system.

Here’s a brief timeline of that history:

1752: The Pennsylvania Hospital in Philadelphia opened up a small number of rooms for people with mental illness, and later expanded to a ward outside of the hospital. In 1856, the new Pennsylvania Hospital for the Insane was opened and remained open under various names until 1998.

1773: The Virginia Legislature provided funds to open a small hospital in Williamsburg, which eventually grew in size. Today, the building houses the Eastern State Hospital.

1841: Dorothea Dix, a Massachusetts school teacher, visited the East Cambridge Jail where she saw and documented the terrible living conditions for mentally ill patients. She lobbied lawmakers for change until she died in 1887.

1887: Nellie Bly, a reporter for New York World, pretended to be insane in order to be admitted to the Women’s Lunatic Asylum in New York. Her “Ten days in a mad-house” expose detailed the treatment of patients in the hospital and led to reform.

1890: By the beginning of the 20th century, every state had one or more publicly supported mental hospital, housing over 500,000 patients.

1907: The Indiana Eugenics Law was legislation that led to the sterilization of over 18,000 mentally ill people by 1940 was enacted to “prevent procreation of confirmed criminals, idiots, imbeciles and rapists.”

1936: Dr. Walter Freeman performed the first prefrontal lobotomy on a 63-year-old woman with depression, anxiety and insomnia. He would go on to participate in over 3,500 lobotomies, some on children.

1938: Electroshock Therapy was introduced.

1946: The National Mental Health Act was signed by President Harry Truman, creating the National Institute of Mental Health and providing funds to conduct research in mental illness.

1955: The number of mental health patients peaks, hitting nearly 560,000 people in mental hospitals.

1963: President John F. Kennedy signed into law the Community Mental Health Act, authorizing federal grants to build nonprofit and community mental health centers.

1965: Medicaid was introduced, preventing federal funds from being used by states to care for people who lived in mental health institutions. As a result, states were pressured to close psychiatric hospitals.

1967: The Lanterman-Petris-Short Act was signed into California law by then-Governor Ronald Reagan. The act ended the involuntary admission to mental health hospitals, which eventually led to the number of mentally ill people in jail doubling.

1980: President Jimmy Carter signs the Mental Health Systems Act, aiming to restructure the community mental health system and improve service for the chronic mentally ill.

1981: President Ronald Reagan repeals Carter’s Mental Health Systems Act, decreasing federal mental health spending by 30 percent.

1985: Federal funding to community mental health programs is cut by 11 percent.

2004: A study suggests that nearly 16 percent of the prison population suffers from mental illness.

2009: After the Great Recession, states are forced to cut public mental health spending by $4.35 billion over the next three years.