We use computers for just about everything: communicating, avoiding long lines at the mall, and even ordering pizza. Thanks to new research, their presence is extending beyond our waking lives.

It might sound like something out of science fiction, but scientists have discovered a way to use computers to read people’s minds. More specifically, they’re learning that the same parts of the brain “light up” when we’re awake as when we’re asleep depending on what we’re thinking about, according to recent findings published in the journal Science. By tracking the brain’s activity with functional magnetic resonance imaging (fMRI) and monitoring blood flow to different regions, they can determine which parts of the brain are active when people are imagining — or dreaming about — a specific object. They can then use that information to analyze dreams based on their imagery.

That’s pretty big, and it has all sorts of implications.

As far as techniques go, fMRI is safe and non-invasive, doesn’t require radiation, and is easy to use. It’s helped broaden our knowledge about memory formation, language, emotion, and more in the last decade.

It makes sense that dreams would be a logical next step in application.

We know so little as it is about the purpose and significance of dreams. Some speculate that they’re a way for us to deal with the stress and problems of daily life, while others look to them as puzzles that can tell us about aspects of our psychology, like our fears and desires.

Most of us have experienced recurring dreams and nightmares. Mine once involved a Tyrannosaurus rex that was stomping around the kitchen, and whenever I need to use a public bathroom in a dream, they’re always crowded and way too exposed. Make of that what you will (or not, please).

The more data we collect about the visual clues in our dreams, the more we can understand our relation to them. Scientists are even recording common themes and patterns, like scenery versus people, and they’re even able to create blurry “videos” that reconstruct a person’s dreams. In the future, these (disturbingly accurate) techniques could be used to communicate with people in comas and other vegetative states.

So where does one draw the ethical line with using computers to extract information? If dreams hold hidden meaning, groping around in someone’s mind could reveal deep, dark secrets — some of which might bear value. Or maybe that kind of direct brain-tapping belongs in the movies.

However, these advances could come with benefits. They might enable scientists to better comprehend why some people suffer more nightmares than others and how to help them. Gender, sleeping habits, and psychological illnesses like depression already play a role. As they say, a good night’s sleep can cure all — or at least make us healthier, happier people.

Further studies might even grant insight into conditions like sleepwalking, which could provide researchers with a virtual “tour” of the complex dream a person is physically acting out. It’s common for those patients to forget what they experienced upon waking.

Additional research might also advance treatment for sleep disorders like insomnia or narcolepsy, which are often treated with medication. One day, we could live in a world where prescribing drugs isn’t necessary. If we’re plucking dreams out of people’s heads, it’s not too far-fetched to think we could someday plant good ones in and give people much-needed rest.

No matter what stage we’re at in our lives — from a child who’s suffering night terrors to an adult who can’t get the most out of those precious hours — sleep is important. After all, we spend a third of our lives doing it.

And if you believe that dreams are premonitions of the future, well, who knows what we might dig up?