Doctors may be able to smell stomach cancer on your breath, according to research presented at the European Cancer Congress 2017 conference in Amsterdam.

The process relies on detecting five chemicals that could appear in different levels in people with esophageal or stomach cancer, the European Cancer Organization said in a statement. A trial with more than 300 patients was 85 percent accurate in diagnosing the cancers, after gathering breath samples and using a mass spectrometer to analyze their contents.

Read: What You Need to Know about Colon Cancer

One researcher, Dr. Sheraz Markar from Imperial College London, said at the conference that the only way to diagnose these cancers right now is with endoscopy, which involves threading a tube with a camera down the patient’s digestive tract to get a good look at it.

“This method is expensive, invasive and has some risk of complications,” Markar said. “A breath test could be used as a non-invasive, first-line test to reduce the number of unnecessary endoscopies. In the longer term this could also mean earlier diagnosis and treatment, and better survival.”

He explained that the method works because cancer cells produce different chemical mixtures from healthy cells.

That principle is behind another recently developed breath test device called the Na-Nose. Its inventors say it can currently detect 17 different diseases by analyzing the chemicals in a person’s breath and picking up on the chemicals’ various combinations. Those diseases include Parkinson’s, multiple sclerosis, kidney disease and certain cancers.

The European Cancer Organization said the newly presented breath test could lead to better survival rates for what are now two deadly cancers.

According to the American Cancer Society, stomach cancer could show itself with a poor appetite and unintended weight loss, belly pain, abdominal discomfort, a feeling of fullness, heartburn, nausea, swelling and anemia. Esophageal cancer symptoms can include trouble swallowing and thus unintended weight loss, chest pain, hoarseness and bleeding. However, those symptoms for both cancers are more often associated with later-stage disease, making it hard to detect them early and harder to treat. “Only about 1 in 5 stomach cancers in the United States is found at an early stage, before it has spread to other areas of the body.”

The American Cancer Society estimates that in 2017 almost 11,000 people will die from stomach cancer and more than 15,000 will die from esophageal cancer.

According to the European Cancer Organization, the researchers are working on a larger trial for their stomach and esophageal cancer detection method and are trying to expand the breath tests to work on other cancers as well.

See also:

What Deformed Lemons Teach Us About Breast Cancer

Avocado Could Cure Your Bad Breath