Since its television debut in 1995, Friends's "Smelly Cat" song has become ubiquitous in pop culture’s collective consciousness. Lisa Kudrow even joined Taylor Swift onstage to perform it live during a Los Angeles concert in 2015. “She’s only ever played in coffee houses before,” Swift joked during her introduction.

But before Kudrow’s character Phoebe Buffay played "Smelly Cat" for Central Perk's patrons, its eponymous pet wasn’t a cat—it was a dog. More specifically, a dog owned by Betsy Borns, head writer of the season 2 episode where the song is first mentioned. “My dog was so smelly his name was Gouda, because he smelled like bad cheese,” Borns told Refinery29. “But it was determined that cat was funnier.”

Borns didn’t elaborate on how that determination was reached, and she also allowed that she might not be remembering the whole story, since it happened in 1995. According to fellow Friends writer Adam Chase, the title was his idea. “The first time it appeared, it was just in dialogue,” he said during an interview on the Friends With Friends podcast. “And we just needed a funny song title and I pitched that title.”

Once it was decided that Phoebe would actually perform the song later in the episode, they did need lyrics. Chase recalled this process also being a collaborative effort in the writers’ room that took place sometime after midnight: Friends co-creator David Crane floated “Smelly cat, smelly cat, what are they feeding you?” and writer Jeff Astrof added “Smelly cat, smelly cat, it’s not your fault.” The rest unfolded from there.

When it came to setting the lyrics to music, Lisa Kudrow took the reins—with some help from The Pretenders’ Chrissie Hynde. In the episode, “The One With the Baby on the Bus,” Hynde plays professional musician Stephanie Schiffer who replaces Phoebe as Central Perk’s resident entertainer. The snippets we end up hearing in various Friends episodes are taken from the chorus and a couple verses, as seen here:

[Chorus]
Smelly cat, smelly cat
What are they feeding you?
Smelly cat, smelly cat
It's not your fault

[Verse 1]
They won't take you to the vet
You're obviously not their favorite pet
Smelly cat, smelly cat
It's not your fault

[Verse 2]
You may not be a bed of roses
You’re no friend to those with noses
I promise you before we’re done
All the world will smell as one

But Kudrow and The Pretenders actually recorded a longer version of the song for the 1999 compilation album Friends Again, though the artist listed is “Phoebe Buffay and The Hairballs.” You can hear it below—rocking out with your own smelly cat (or dog) is encouraged.

[h/t Refinery29]