Early humans had to deal with cavities too and an infected 14,000-year-old tooth may have just given us a glimpse into the oldest known evidence of dentistry. Instead of sterile instruments and anesthesia, our ancestors had their cavities removed with sharpened stone tools. So, the next time you’re visiting your dentist be thankful you don’t have to undergo the grim, rudimentary dental practices from the Paleolithic era.

The study, published in the journal Scientific Reports, analyzed a molar from a well-preserved 25-year-old male skeleton, whose remains were first discovered in a rock shelter in Belluno, Italy, in 1988. Researchers found evidence that the molar had been infected and was partially treated with sharp, flint tools.

“The treatment went unnoticed for all these years. The cavity was described as a simple carious lesion,” lead researcher Stefano Benazzi from the University of Bologna told Discovery News.

Researchers analyzed the infected molar with a scanning electron microscopy and found chippings and striations, which they suggest is evidence for the “intentional” removal of the infected tissue with a small, sharp tool. Researchers attempted to replicate the dental procedure by scraping three molars with different materials that included wood and bone. The tests confirmed that the striations found on the infected tooth were a result of scratching and chipping. Researchers also note that the painful procedure occurred while the individual was alive.

“The discovery suggests, moreover, that in the Upper Palaeolithic era, humans were aware of the damaging effects of cavity infections and of the necessity of treating them, using stone instruments to remove the infected material and to clean out the cavity,” Benazzi told an Italian newspaper, Il Resto del Carlino, The Telegraph reports.

The ancient tooth represents “the oldest archaeological evidence of» dentistry, the study notes. It predates the next oldest-known evidence of a dental procedure by 5,000 years. Researchers suggest the findings may show how early humans adapted the toothpicking technique to early forms of dentistry that included scratching cavities using microlithic points.