In season 4 of Black Mirror, we were treated to another rare happy ending, and Charlie Brooker explained his inspiration for the episode.

Netflix’s Black Mirror is one of the best shows on television these days, but it absolutely has a reputation for being hard to watch at times. Because the series is meant to be an indictment of our society’s reliance and dependence on technology, things can often devolve shockingly quickly in a one-hour episode.

Related: Black Mirror season 4: One theme ties every episode together

Season 4, however, touted one of the series’ very few episodes with a happy ending. “Hang the DJ” follows two characters who are using a dating service to find their ultimate match, and must go through a harrowing journey to find true love.

The episode was great, and it was one of the few that left audiences feeling a bit hopeful and happy. So in a video that Netflix just released, Charlie Brooker explained his inspiration for “Hang the DJ.”

The episode follows Frank and Amy as they use a dating service to find their perfect match. Of course, as they both find they are about to be paired with their ultimate match, the two must make some hard choices and work to fight for that perfect relationship.

So where did the inspiration for this episode come from?

Brooker describes dreaming up a service “a bit like Spotify for dates,” which assigns partners to a person and learns from the reactions of the user to better hone in on their perfect match. In this “codified version of real life,” you date a wide range of people, and the length of the relationship and your future relationships are chosen based on an algorithm that measures your personality and your reaction to the new pairing.

It’s a clever idea, and the episode was a captivating journey into what makes a couple work. And if this episode of Black Mirror is any indication, Spotify for dates might not be such a bad idea.

What did you think of ‘Hang the DJ’?