Researchers can tell if you are eating healthy by taking a look at your urine, and they can use that information to see if you’ve been following your doctor’s diet advice.

A study in Lancet Diabetes & Endocrinology explains that researchers randomly put 19 people on four different diets and then collected urine from them, and were able to distinguish between the different diets based on that waste collection. In their analysis, they were relying on biological markers in the urine that are evidence of the breakdown of different foods — like red meat and specific fruits and vegetables — as well as dietary elements such as fat, sugar, fiber and protein. They were also able to determine a urine profile that would be associated with a healthy diet.

Read: Weird Minerals You Need in Your Diet

The authors say the method will help experts objectively monitor dietary patterns in both individuals like those recovering from a heart attack and on larger scales, such as in weight loss programs.

That objectivity is important: “A major weakness in all nutrition and diet studies is that we have no true measure of what people eat,” senior author Gary Frost said in a statement from Imperial College London. “We rely solely on people keeping logs of their daily diets — but studies suggest around 60 percent of people misreport what they eat to some extent.” That could be underreporting their snack food intake and overreporting how many veggies they eat.

The next step for the researchers, from Imperial College London, Newcastle University and Aberystwyth University, is to test it on larger groups of people and make the analysis more precise.

“We’re not at the stage yet where the test can tell us a person ate 15 chips yesterday and two sausages, but it’s on the way,” co-author Isabel Garcia-Perez said.

Testing your urine is not the only way experts could learn about your diet — they could also analyze the chemical evidence you leave behind on everything you touch. Scientists have collected samples from items like cell phones, keys, pens and handbags and used equipment to separate substances from what people have left behind by touching those objects. From that, they can get information about a person’s lifestyle, like their diet, what beauty products they use, which medications they take, or where they’ve been. The information could also be used as a form of trace evidence during police crime scene investigations to learn more about potential suspects, and in other practical applications. 

Source: Frost G, Garcia-Perez I, Posma JM, et al. Objective assessment of dietary patterns by use of metabolic phenotyping: a randomised, controlled, crossover trial. Lancet Diabetes & Endocrinology. 2017.

See also:

What the Heck Is a Calorie Anyway?

5 Diets Based in Religion