Ever wish you could erase any one of those bad memories you’ve compiled over the years? There’s good news, if you’re a mouse at least. Scientists have successfully reversed memories from unhappy to happy (insofar as rodents feel such things) in lab mice using lasers and light-sensitive organisms to control the memory-making parts of their brains.

First, scientists from the Massachusetts Institute of Technology and the RIKEN Institute in Japan genetically engineered a group of mice with memory-making neurons sensitive to certain kinds of light. This allows scientists to use lasers to control the function of those neurons, using a process called optogenetics.

Then they split the mice into two groups; one group was sent into a specific part of their enclosure and electrically shocked, while the other was sent into an area and allowed to spend time with a female mouse. That created positive and negative spaces. Naturally, the first group formed a negative memory of the space associated with pain and the second group formed a pleasant memory.

After confirming that the mice had indeed formed those memories with the light-sensitive neurons they previously identified, the scientists activated them and exposed them to the opposite experience. The mice that were initially shocked had their unpleasant memory neurons activated and allowed to spend time with a female and vice versa.

That reversed their associations. Now one group of mice associated the shock memory with pleasure and the other associated time with the female with pain. The MIT and RIKEN scientists involved hope that what they learned and established with the study could be used to create new methods and treatments for sufferers of post-traumatic stress disorder.

New York University Psychologist Elizabeth Phelps called the studies “interesting advances” but said it would be a long time before it gets translated to being used on humans because human memories, like those associated with PTSD, are “likely much more complex” than the memories of the mice in the study.

Then again, if the process could be used on humans, scientists could do the opposite: a person’s good memories could be turned to bad memories, just like with the mice. So your favorite place to go for a run could all of a sudden become associated with fear, or scientists could make you hate your favorite food. Let’s just hope no mad scientists figure out how to replicate the process.

Watch a video explaining optogenetics (jargon warning) and how else it could be used: