President Trump this afternoon signed into law the farm bill, the twice-a-decade omnibus legislation that funds projects under the purview of the Department of Agriculture, from food stamps to conservation programs.

For animal advocates, farm bills are typically bleak affairs. Much of the legislation is dedicated to subsidizing animal agriculture, a system under which billions of animals live and die in torturous conditions every year.

But this year, there are some animal policy victories in the bill, too — just small ones.

The farm bill is a major vehicle for all agricultural and food policy in the United States. It includes crop insurance, subsidies, nutrition assistance, foreign food aid, research, and conservation. Unsurprisingly, then, it has also become a major vehicle for all federal animal welfare policy.

Federal animal welfare policy has traditionally not been pro-animal, especially compared to states and public opinion. Several states have moved ahead in recent years with full bans on some of the worst practices in industrial agriculture, such as battery cages. There’s a surprising degree of public support for even more extensive measures to protect animals.

Congress, meanwhile, considered — and ultimately rejected — an amendment that would have denied states the authority to enforce animal welfare standards within their own borders. The farm bill could easily have been a major setback for animals and for the voters who’ve overwhelmingly sided with them.

Instead, the final version of the bill takes some tentative steps forward for animals. It doesn’t address most of the abuses of the industry, but several of its provisions represent real progress.

Here’s what’s in the farm bill

There are three major provisions for animal welfare in the act. None of them address large-scale factory farming, but they each should modestly reduce animal cruelty in some specific domains.

One provision of the farm bill prohibits the import, export, and slaughter of dogs and cats for human consumption. Even though consumption of dog and cat meat is uncommon in the US, there are no laws prohibiting it in 44 states.

The Pet and Women Safety (PAWS) Act tries to address a problem for both humans and companion animals: Victims of domestic violence are often afraid to leave because they expect their abusive partner to abuse or kill their pets in retaliation. The PAWS Act commits more resources to housing domestic violence survivors with pets and changes law enforcement policy so these situations are a little more addressable in our current legal framework, which imposes only mild penalties for killing someone’s pet.

Finally, the farm bill closes a loophole. Animal fighting (such as cockfighting or dogfighting) is illegal in all 50 states and the District of Columbia, but that leaves it legal in US territories like Puerto Rico and Guam. The bill extends the prohibition on animal fighting to US territories as well.

And here’s what isn’t in the farm bill

Animal advocates’ greatest fear going into the farm bill debate was that it would include a provision known as the King Amendment, named after Iowa Rep. Steve King. King has been widely criticized, including by his fellow Republicans, for his far-right ties and sympathy for white supremacists. He’s also an ardent opponent of animal rights, and wanted to use the farm bill to prohibit states from setting their own animal welfare standards.

The King Amendment was designed to combat a recent trend: voters in states like Massachusetts and California have started prohibiting certain cruel practices, not just on farms in those states but any farms that want to sell their products there. Since California has 50 million people, farmers in much of the country end up abiding by the standards which California voters set, to reach the lucrative market there. King wanted to prohibit California from requiring meat and eggs sold within its borders to meet state-specific standards.

The amendment could have interfered with “state restrictions on gestation crates for pigs, tail-docking of cattle, and horse slaughter, along with state bans on the sale of foie gras, eggs from hens kept in extremely small battery cages, and pets from puppy mills,” concluded the Animal Welfare Institute’s analysis.

But Congress rejected the amendment. That means that while the farm bill’s steps for animals may be small ones, they won’t be accompanied by a big blow to animals and voters.

What can we expect five years from now?

The farm bill is reauthorized every five years, meaning the fight over its contents will be around again before we know it. But it might face a significantly different political and animal-welfare landscape in five years.

A string of successful corporate campaigns has gotten many of America’s biggest companies to publicly commit to reforms that improve conditions for animals. Plant-based meat alternatives have taken off, and animal advocates are increasingly looking at meat alternatives as a crucial part of the fight to reduce our reliance on industrial agriculture.

Curtailing the cruelties of factory farming polls surprisingly well. Sixty-nine percent of Americans think “factory farming of animals is one of the most important social issues in the world today,” and 49 percent actually support a ban on factory farms. It may well be that at some point, some politicians at the federal level will notice that animal welfare issues are winning ones — and that a future farm bill might have larger-scale, more ambitious provisions for animals.

Do you ever struggle to figure out where to donate that will make the biggest impact? Or which kind of charities to support? Over 5 days, in 5 emails, we’ll walk you through research and frameworks that will help you decide how much and where to give, and other ways to do good. Sign up for Future Perfect’s new pop-up newsletter.