In popular imagination, Home Neanderthalensis, or Neanderthals — the closest relative of Homo Sapiens, the only surviving human species — were a savage people, who had little knowledge of science and primarily subsisted on hunting, eating mostly meat. But as we keep learning, that image is far from the truth.

A study, titled “Neanderthal behaviour, diet, and disease inferred from ancient DNA in dental calculus” and published Wednesday in the journal Nature, sheds further light on some of the habits of our now-extinct cousins. Based on the analysis of dental plaque from four specimens found in caves in Spain and Belgium, researchers have been able to determine food habits and even medical knowledge of Neanderthals, as well as the fact that at least some of them were swapping saliva with their Sapiens cousins (how exactly this was done is not known).

A large international team of researchers — led by the University of Adelaide’s Australian Centre for Ancient DNA (ACAD) and Dental School, with the University of Liverpool in the United Kingdom — analyzed the plaque samples which are between 42,000 and 50,000 years old, the oldest dental plaque to ever be studied. And the researchers found a wide variety of food habits.

“Dental plaque traps microorganisms that lived in the mouth and pathogens found in the respiratory and gastrointestinal tract, as well as bits of food stuck in the teeth — preserving the DNA for thousands of years. Genetic analysis of that DNA ‘locked-up’ in plaque, represents a unique window into Neandertal lifestyle — revealing new details of what they ate, what their health was like and how the environment impacted their behavior,” study lead author Laura Weyrich of ACAD said in a statement Thursday.

The Neanderthals who lived in the Spy cave site in Belgium were meat eaters, consuming woolly rhinoceros and wild sheep, and supplemented their diet with mushrooms. Their counterparts from the El Sidrón cave site in Spain, on the other hand, had a mostly vegetarian diet, eating nuts, moss, mushrooms and tree bark.

Read: Part Human, Part Neanderthal Skulls Found In China Trigger Debate: Did They Belong To The Mysterious Deniso­vans?

Another discovery from an individual in El Sidrón revealed startling knowledge about natural medicine. The individual suffered from diarrhea due to a stomach parasite, and had been eating poplar and a specific kind of mould — substances not found in the plaques of other specimens from the site — which contain a painkiller (salicylic acid, the active ingredient in aspirin) and an antibiotic (Penicillium) respectively.

“Apparently, Neanderthals possessed a good knowledge of medicinal plants and their various anti-inflammatory and pain-relieving properties, and seem to be self-medicating. The use of antibiotics would be very surprising, as this is more than 40,000 years before we developed penicillin. Certainly our findings contrast markedly with the rather simplistic view of our ancient relatives in popular imagination,” Alan Cooper, director of ACAD, said in the statement.

Genome analysis revealed another interesting fact. Neanderthals and Sapiens share bacteria that causes diseases of the teeth and gums, suggesting the two human species were swapping saliva — either through sharing food or maybe by more intimate acts like kissing — long after they had diverged from a common ancestor.

Read: Autism Exclusive To Humans, Neanderthals Lack DNA Sequence Responsible For Disorder

Neanderthals and modern humans interbred occasionally, as is evidenced in the genome sequence of Homo Sapiens. Neanderthal genes account for 2-4% of modern human DNA.