A Chinese city has implemented a credit score for dog owners—and enough dings could result in their furry friends being taken away from them.

In Jinan, a city in Shandong province, local authorities have used a 12-point system for dog owners since 2017, with fines levied and points deducted if they fail to properly care for their pooches, such as not picking up after them or letting them roam off leash.

It’s a regulatory system similar to one implemented by the Chinese government (link in Chinese) in 2014. As a result of China’s national social-credit system, more than 11 million people have been banned from flying and around 4 million from taking the country’s bullet trains as of April. Some cities like Shanghai have also developed their own credit scores in an effort to encourage better behavior. Apart from the government, Chinese technology giants like Alibaba and Tencent have also developed their own credit-scoring systems rating people’s shopping behavior and online trustworthiness.

In Jinan, the social-credit score takes into account regulations for dogs that have been in place since 2007 (link in Chinese), but the city updated its requirements (link in Chinese) last year when it rolled out its credit scores for dog owners. The list includes (link in Chinese):

Owners are required to carry a dog license whenever their canines are in public:

Dogs should be on leashes, and under the control of people who are over 18 years old. The length of the leash cannot exceed 1.5 meters (5 feet).

Owners must bring items to clean dog waste in a timely manner.

Dogs are not allowed in government buildings, public transportation, schools, hospitals, kindergartens, parks, public squares, gyms, hotels, restaurants, markets, and shopping malls.

Dogs are now allowed to play or swim in fountains or other public water areas.

The number of points deducted depends on the violation and whether the owner is a repeat offender. For example, someone could lose three points for walking an unleashed dog, with a second-time violation resulting in six points deducted and a fine of 200 to 500 yuan ($30 to $70). Failing to renew a dog license results in a loss of 12 points—at which point authorities can confiscate the animal.

To get their dogs back, owners need to pass a multiple-choice exam that tests them on regulations for dogs, according to Beijing Youth Daily (link in Chinese). After passing, their score resets to 12.

There are also methods to up one’s score. Volunteering to stop bad dog behavior can net three points, and helping spread information on good pet ownership can result in an extra point, reported the newspaper.

The system appears to have its intended effect. Local police, who use an app to pull up dogs’ files, have so far penalized 1,430 pet owners, among whom 122 had lost all their points as of early August. However, the number of complaints of unleashed dogs went down 43% in 2017 compared with the previous year, and there has also been a 65% reduction in dog-related disturbances and attacks reported over the same period, Beijing Youth Daily reported.