Earlier this year we told you that instead of giving you the fastest route between two points by default, Google Maps will suggest a route that is more environmentally friendlyand uses less energy. Now, looking to prevent accidents, the Google Maps app will route users away from roads where drivers are known for braking hard which can lead to accidents. Google will then give other drivers an alternative route to prevent accidents from happening.

If a driver on the road slams on his brakes, a car behind him might not be able to to stop in time causing a chain reaction of crashes. Keeping users away from those roads where slamming on the brakes is typical, Google hopes to see fewer accidents, fewer injuries, and safer driving. According to Auto-Evolution, over 100 million hard-braking events can be eliminated a year if Google Maps directs drivers to take safer routes.

Google says, “For example, if there‚Äôs a sudden increase in hard-braking events along a route during a certain time of day when people are likely to be driving toward the glare of the sun, our system could detect those events and offer alternate routes.” The new feature will be available on both the Android and iOS version of Google Maps.

To determine which roads are dangerous because of drivers who are braking hard, Google turns to sensors that are placed inside drivers’ mobile devices. Accelerometers and gyroscopes can spot areas of the road where there is sudden deceleration pointing to hard braking. But even Google has to admit that just relying on sensors can lead to a false alarm.

Slamming a phone into a cup holder can create a false alarm and Google Maps might read that sudden stop as a car whose driver just slammed on the brakes. To improve the accuracy of the feature, Google turns to AI and analyzes Google Maps to see whether the driver slammed on the brakes along the route that was taken. Google can also analyze the actions taken by other vehicles taking the same road at the same time in order to determine the reason why a driver slammed on the brakes.