That ticket challenge worked its way through the state’s legal system, all the way to the 5th District Court of Appeal, which ruled in the man’s favor on Thursday, reports the Associated Press.

It’s illegal to use phones while driving in California, but that’s not the right the man said he’s fighting for. He doesn’t want people distracted while cruising, texting or checking Facebook. He just wanted the law rewritten for police officers so they can do their jobs.

“We’re distracted all the time,” he said. “If our distractions cause us to drive erratically, we should be arrested for driving erratically.”

In his case, his car was at a stop due to road work. He picked up his phone to see if he could figure out an alternate route out of the mess — something anyone who hates traffic jams would do, and who loves a traffic jam? But a California Highway Patrol officer on a motorcycle saw him on his phone and issued a ticket.

He challenged the case in traffic court, then appealed in a county superior court and lost again. But he moved up to the appellate court with the help of a law firm that offered him free help.

And this time, the appellate judges were on his side: The ruling says that while the law prohibits people from yapping on cellphones without a hands-free device, it could’ve been more clear. It doesn’t apply to people looking at a map, only to those “listening and talking” on cellphones.

You also can’t text while drive in California, which is another law entirely.

From here, it’ll be up to the state attorney general’s office to challenge the ruling or not, and bring it up to the California Supreme Court. That body doesn’t let just any case be heard, so it could be tricky. The AG’s office is reviewing the ruling, a spokesman said.

The man will also recoup his $165 fine, and hopes that legislators will now tweak the spotty law.

“They’re going to have to do something,” he said. “I just hope they take a look at the big picture.”