Scientists are closer than ever to developing a transparent skull implant that would provide a “window into the brain” and the ability to treat diseases with lasers, according to a study published Friday in the journal Lasers in Surgery and Medicine.

Studies in the past few years have shown that shining narrow beams of light into the brain can help treat conditions such as traumatic brain injury, neurodegenerative diseases, and stroke. The lasers, researchers have found, prevent neurons from dying in the brain.

But that would often require repeated surgeries to open up the skull. So researchers have been trying to find a suitable material for a clear implant that would let the laser light shine through to the brain. But these kinds of implants were risky because patients were much more likely to get a bacterial infection from them, even months after the procedure itself was over. One study found that 5 percent of patients receiving skull implants got an infection, compared to the average of 1 to 3 percent or patients receiving other surgeries, depending on the surgical site. Another study performed on 900 dogs found that more than 8 percent developed an infection within six months of the procedure.

While post-surgery infection is always dangerous, it’s particularly worrisome in brain surgery, since an infection can lead to brain inflammation, which can cause mild symptoms like fever or headache, or more severe outcomes like brain damage or stroke.

The researchers behind this study, led by engineers from University of California, Riverside, had a difficult task set out for them: To develop an implant stable enough to stay on the scalp and clear enough so that lasers can easily move through it. They also needed to reduce the risk of bacterial infection following implantation.

To make their implant, the researchers used a synthetic material called nanocrystalline yttria-stabilized-zirconia (nc-YSZ)—the same material used in hip implants and to crown teeth—because it’s tough and transparent. To test the device for bacterial infection resistance, the researchers put a sample of the material over E. coli bacteria in a petri dish, let the bacteria grow overnight, then shot near-infrared light through the would-be implant. The researchers found that the light prevented the bacteria from sticking on the implant, which indicates the material could be a good option for reducing post-skull implant infection rates.

The implant isn’t likely to make its way to a patient’s operating room anytime soon—it’s still in its initial phases because it hasn’t yet been tested on a living organism. But the results of this study indicate that it would be a good candidate for future testing. The team hopes that their work could someday help patients receive the benefits of laser treatments with fewer risks, according to a press release.