American Amber Pearson used to wash her hands until they bled, terrified by the idea of contamination from everyday items, a debilitating result of her obsessive compulsive disorder (OCD).
But the repetitive rituals of her condition are largely consigned to memory, thanks to a revolutionary brain implant that is being used to treat both her epilepsy and her OCD.
"I'm actually present in my daily life and that's incredible," the 34-year-old told AFP.
"Before, I was just constantly in my head worrying about my compulsions."
Brain implants have hit the headlines recently with Elon Musk's announcement that his Neuralink company had placed a chip in a patient's head, which scientists hope will ultimately allow people to control a smartphone just by thinking about it.
But the idea of inserting a device into the brain is not new, and for decades doctors have known that precisely applied electrical stimulation can affect the way the brain operates.
Such deep-brain stimulation is used in the treatment of Parkinson's disease and other conditions affecting movement, including epilepsy.
Pearson's doctors offered her the 32-millimeter (just over an inch-long) device to treat her debilitating epileptic seizures, confident it would be able to detect the activity that causes the episodes and deliver a pulse to interfere with them.
It was then that Pearson herself had something of a lightbulb moment.
"It was her idea to say: 'Well, you're going into my brain and putting this wire, and I have OCD, so can you just put a wire for OCD?'," recalls neurosurgeon Ahmed Raslan, who carried out the procedure at Oregon Health and Science University in Portland on the US West Coast.
"And you know, luckily, we took that suggestion seriously."
There had previously been some study of the use of deep brain stimulation for people suffering from OCD, but, says Raslan, it had never been combined with treatment for epilepsy.
Doctors worked with Pearson to see exactly what happens in her brain when she gets trapped in an obsessive loop.
The technique involved exposing her to known stressors – in this case, seafood – and recording the electrical markers.
In this way, they could effectively isolate the brain activity associated with her OCD.
They could then configure her implant so that it would react to that specific signal.
Hope
The dual-program device now watches for brain activity associated both with epilepsy and with OCD.
It is "the only device in the world that treats two conditions," says Raslan.
"And it's programmed independently. So the program for epilepsy is different than the program for OCD."
It's a breakthrough he thinks only someone like Pearson could have come up with.
"This is the first time in the world that's been done. Usually we think of devices either for OCD or for epilepsy.
"This idea sits outside of the box and would only come from a patient," he says.
Raslan said a study is now under way at the University of Pennsylvania to see how this technique can be more widely applied, offering possible hope to some of the 2.5 million people in the United States who suffer from OCD.
For Pearson, there was an eight-month wait after the 2019 procedure to see any noticeable difference.
But gradually, the all-consuming rituals that had taken up eight or nine hours every day since her teenage years began to ebb.
The endless pre-bed checklists of window-shutting, and the constant hand-washing diminished to a manageable 30 minutes a day.
And the fear of contamination from eating with others is now gone.
"I'm happy again and excited to go out and live and be with my friends and my family," she said.
That "was something I was cut off from for years."