A new law that went into effect in California Jan. 1 is supposed to make it harder for companies to hire workers as contractors — but gig companies like Uber, Lyft and the food delivery platform Postmates are refusing to reclassify their fleet of drivers as employees.

Supporters of Assembly Bill 5 claim companies have been exploiting contract workers for years because they aren't considered employees who get benefits like health coverage and workers' compensation.

The law touches many industries, everything from trucking to tech to certain medical professions. AB5 does include carveouts for other professions, including dentists and attorneys.

Democratic Assemblywoman Lorena Gonzalez says misclassification is a problem throughout the economy, but she zeroed in on gig companies during last year's legislative session.

"The same week that workers had to go on strike because their per mileage fee was being cut, an investor was celebrating his $30,000 investment that became $120 million in one day," she said during a debate on the Assembly floor in April, shortly after Lyft went public. "Something is wrong with the way that we have allowed these companies to operate," Gonzalez said.

The legislation codifies a ruling from the California Supreme Court that established a new test for classifying workers. Gonzalez says she hopes city attorneys and the state attorney general will hold gig companies responsible for not complying with the law.

"This is an ongoing battle," she says.

Uber and Lyft declined an interview for this story, but they and other gig companies have developed a multipronged strategy to avoid complying with the new law.

First, companies are negotiating with lawmakers and labor unions to create an alternate class of worker — basically a contractor with added benefits.

Also, earlier this week, Uber and Postmates filed a lawsuit in federal court challenging AB5.

Then, there is the nuclear option: Gig companies have sunk more than $100 million into a ballot measure to exempt them from the requirement that they are hoping to put before voters in November.

Drivers on all sides of the debate have weighed in. A group called Gig Workers Rising has mobilized drivers to demand better wages and the opportunity to collectively bargain. The group lobbied lawmakers to pass AB5.

But others say they fear losing the flexibility that comes with setting their own hours as a contractor.

"With this job, I have the freedom to work when I have time," says Alfonso Martinez, who drives for Uber in the Sacramento area. He says it allows him to balance the demands of being a father to school-aged children who have special needs.

Industries such as trucking, journalism and those involved in the gig economy are pushing back by filing suit in federal court.

But some companies are scrambling to figure out how to comply.

In December, the sports website SB Nation announced it would terminate contracts with hundreds of freelancers in light of California's new labor law.

Bradley Geiser and Will Griffith are a couple of those freelance writers. They've contributed interviews, commentary and reporting to the Sacramento Kings blog, Sactown Royalty, for the last five years.

Geiser says writing for the blog isn't just about making some money on the side, it has also allowed him to raise his profile as a sports writer.

"I don't think I would be where I am, trying to be a writer today, without the opportunity they gave me," he says.

Vox Media, which owns SB Nation, did not respond to a request for comment. The company said it plans to replace the freelancers with a staff of full-time employees, but just how many remains unknown.

The new law does provide a specific carveout for freelancers: They can contribute up to 35 submissions per year to a single outlet and still be considered contractors.

But a lawsuit filed in federal court by journalism and photography associations argues the law violates the First Amendment.

While the two Sacramento-area writers aren't involved in the lawsuit, Griffith says he supports it.

"If you can't hold [Uber and Lyft's] feet to the flames, and [the law is] affecting people that it really wasn't supposed to affect, then something needs to be changed — and quick," he says.