Say you’re a single, unattached person at a bar or social event. You meet someone new and start talking. There seems to be some sort of mutual attraction, and turns out that the two of you have a lot in common. Given the hint of a spark, the other person may be a good person to ask out on a date. But if the reason you may have a lot in common is because you’re actually cousins, and not-too-distant ones at that? Change of story.

In most of the Western world, though, that’s incredibly uncommon. Populations are generally rather heterogenous and diverse. But not so in Iceland. Accidentally dating your cousin is an actual social problem — one that technology aims to alleviate.

There are only about 320,000 people living in Iceland. A small island nation, it’s also isolated from the rest of the world, so you don’t have a lot of immigration, historically, and therefore, you don’t have a lot of genetic diversity. In some sense, the vast majority of Iceland’s population are branches from the same family tree. So In 1997, a medical genetics research company called deCODE teamed up with the makers of computer anti-virus software to map it out. Using data from virtually every available source, the company now claims to have “genealogical information about the inhabitants of Iceland, dating more than 1,200 years back.”

If you have an Icelandic ID number (called a “kennitala”), you can log onto the Islendingabok (literally, “the Book of Icelanders”) and look up your genealogy. It’s a great tool if you’re single and want to avoid likely embarrassment before taking the relationship to the next level. As one Icelander told USA Today, “everyone has heard the story of going to a family event and running into a girl you hooked up with some time ago. It’s not a good feeling when you realize that girls is a second cousin.” Check the database, though, and you can avoid that.

Unfortunately, Islendingabok isn’t the most available tool when at a social function — it’s not like you can take out a laptop, ask your potential romantic interest to enter his or her ID, and then dig through each others’ family trees to see how closely you’re related. The good news? In the spring of 2013, some students at the University of Iceland created an Android app which draws from the database and makes it easy to check your familial relationships. As mental_floss describes, the two people “just tap phones [ . . .] and wait for the all-clear.” The app’s tagline?

“Bump the app before you bump in bed.”

The app is generally well-regarded (even though it has only 3.6 out of 5 stars on Google Play) and as Slate notes, at least one user’s biggest complaint was the app wasn’t out earlier: “If I would have had this app last year, I probably wouldn’t have gone home with my cousin.”

Bonus Fact : When Iceland gained independence from Denmark in 1944, it basically adopted the Danish constitution as its own, with a few cosmetic changes. After the collapse of the Icelandic economy in 2008, the country sought to rework the constitution. It was a very participatory experience. The drafting committee opened the drafting of the new one up to the rest of the country — via Facebook and other social networks. The decision to use these platforms was a success in that half of the electorate participated, but the success ended there. The Icelandic parliament declined to adopt most of the suggestions.

From the Archives: The Protest Candidate Who Won: Ah, the politics of Iceland.

Related: “Iceland: Land of the Sagas” by John Krakauer (photos) and David Roberts (text). As of this writing, it’s Amazon’s top-selling book about the history of Iceland, and the 46,422nd overall. 4.2 stars on 33 reviews.