Netflix has become a juggernaut in the streaming industry over the past few years, thanks to the influx of original programming that it’s been introduced, as well as its debut in overseas market. But setting up in new markets isn’t as simple as flipping a switch.

The channel posted a recent blog that explained how it had to make changes to its recommendations section in order to reach new audience members, adjusting algorithms so that they would cater to specific tastes.

For instance, people in the U.S. see particular suggestions for action or comedy flicks, while categories would change for other viewers, like an anime fan based in Sweden. This was noted as a “precarious shift for a core technology” that the company has been working on for well over a year, across a team of just about 70 engineers.

“We were very worried that running the algorithms we knew worked well when we pulled data from a single country and a single catalog, if we tried across places where the catalog differed, the recommendations would be pretty bad,” said Carlos Gomez-Uribe, vice president of product innovation for Netflix, and part of the recommendation redesign team.

To put it into more technical terms, a pair of engineers broke down just how the process works, via the blog post:

“The dystopian Sci-Fi movie Equilibrium might be available on Netflix in the US but not in France. And The Matrix might be available in France but not in the US. Our recommendation models rely heavily on learning patterns from play data, particularly involving co-occurrence or sequences of plays between videos. In particular, many algorithms assume that when something was not played it is a (weak) signal that someone may not like a video, because they chose not to play it. However, in this particular scenario we will never observe any members who played both Equilibrium and The Matrix. A basic recommendation model would then learn that these two movies do not appeal to the same kinds of people just because the audiences were constrained to be different. However, if these two movies were available to the same set of members, we would likely observe a similarity between the videos and between the members who watch them. From this example, it is clear that uneven video availability potentially interferes with the quality of our recommendations.”

Most of the work went into building individual models for each region. “This could capture the taste differences between regions because we trained separate models whose hyperparameters were tuned differently,” the blog explained. “Within a region, as long as there were enough members with certain taste preference and a reasonable amount of history, a recommendation model should be able to identify and use that pattern of taste.

“However, there were several problems with this approach. The first is that within a region the amount of data from a large country would dominate the model and dampen its ability to learn the local tastes for a country with a smaller number of members. It also presented a challenge of how to maintain the groupings as catalogs changed over time and memberships grew. Finally, because we’re continuously running A/B tests with model variants across many algorithms, the combinatorics involving a growing number of regions became overwhelming.”

Despite the hefty difficulties that lied with finding a proper groove for the algorithms, it eventually paid off. “We found not just approaches that will make Netflix better for those signing up in the 130 new countries, but in fact better for all Netflix members worldwide,” the blog concluded. “Our global journey is just beginning and we look forward to making our service dramatically better over time.”

Considering that Netflix has over 75 million subscribers and climbing, with record international growth, there’s a reason to aim high.