Just the thought of eating a spool of cotton candy is enough to give you a cavity. It’s just brightly colored sugar that coats your teeth in a fine saccharine sheen as soon as it hits your mouth. And that’s just the way a dentist at the turn of the 20th century wanted it.

In 1899, one time president of the Tennessee Dental Association William James Morrison, along with his friend and confectioner John Wharton invented something they called the Electronic Candy Machine, which spun sugar into the sweet, airy mass we now know as cotton candy today. It worked out well for Morrison who sold his new invention at the World’s Fair five years later raking in a small fortune. But for some reason he decided to leave the candy world and go back to his dental practice. Maybe he figured his creation would drum up enough new business to make it worthwhile.

Check out the rest of the cotton candy story in the quick video above and more interesting food history from Great Big Story.