Here’s the story behind the “Lemon Law” in How I Met Your Mother. The idea was developed by Barney Stinson (Neil Patrick Harris) in an effort to bail on dates that he thought were going nowhere. The Lemon Law was explained when it became the subject of Barney’s blog.

Barney lived by an interesting set of rules, many of which were created himself and comprised Barney’s own Bro Code. Aside from his mantras and lifestyle beliefs, he invented a series of theories when it came to women. It’s no secret that Barney was a womanizer, but he claimed to be so successful with the opposite sex due to his deep understanding of human nature. Whether it be the “Mermaid Theory” or The Playbook, Barney had a habit of sharing his ideologies to his friends as if they were science. The Lemon Law was one of those beliefs that he wanted to share with the world.

The Lemon Law was first introduced in How I Met Your Mother season 1, and it’s based on lemon laws created to protect purchasers from buying defective used cars. Lemon laws vary by state, and while many consumers products may be faulty, they are typically associated with automobiles; they’re designed to provide a legal remedy for the faulty goods that’ve been bought. Lemon" in this instance is a term used for a vehicle with many defects. Barney came up with the idea to protect the dating world. The dating Lemon Law gave each person five minutes to decide if there will be a second date. In those minutes, they had the chance to call off the date for any reason, avoiding any bad dates. Barney was confident that his Lemon Law would catch on so he added it to his official site, Barney’s Blog, with an official explanation and a card that could be given which read:

The purpose of the law was to save valuable time that could be potentially wasted on pointless dates. In the episode “The Duel”, Robin argued that it would take longer than five minutes to get to know someone. She challenged Barney’s new law by going on a date with a nerdy guy named Kevin. While on the date, Barney called and encouraged her to use the Lemon Law. She refused but the phone call made Kevin suspicious, asking if it was a fake call from the hospital so that she could leave early. Robin claimed she would never do that to her date but then she received a real call from the hospital after Marshall accidentally stabbed Lily. While at the hospital, Barney proudly shared that the Lemon Law was already “a thing” because he was just “lemon-lawed” by a girl on a date.

“The Lemon Law may be invoked if, at any point during the initial five minutes (300 seconds) of a first date. Either party deems the union hopeless and elects to abort said date in the interest of time and/or self-respect. Receipt of this card hereby absolves the giver from any hard feelings or questions from the Lemon Lawyee relevant to the discontinuance of the date. Which may be terminated for any reason including but not limited to: tawdry attire, breath, homeliness, misplaced/excessive body hair, Long Island accent, public school education, bad credit, no credit, suspicious odor(s).”

The Lemon Law was included in Barney’s Bro Code as part of Article 140. The law also included the addendum which stated that the giver could waive the Lemon Law if the date agreed to a one-night stand. The law was also referenced other times in  How I Met Your Mother, including season 3 when Ted was questioning all of Barney’s crazy theories. Many of Barney’s wild beliefs about relationships didn’t have a leg to stand on but he might have had a point when it came to instant connections felt in the opening minutes of dates. Of course, Barney probably took advantage of the Lemon Law considering how many women he encountered over the years.

Next: HIMYM Accidentally Created Breaking Bad’s Mike Ehrmantraut