Distracted driving is dangerous—the CDC estimates that eight people die in the U.S. every day in a car crash with a distracted driver, and 1161 are injured. While plenty of states have laws against texting and driving, for many people, the temptation of that smartphone notification is just too much.

Apple is taking steps to reduce that temptation, though. The company announced today on June 5 that the new iOS 11—set for a Fall 2017 release—will have a “Do Not Disturb While Driving” function, according to The Verge.

The function will be activated through Bluetooth or WiFi data, according to The Verge, though it’s not clear yet how that will work. (Perhaps if you hook your phone up to your car speakers through Bluetooth, then it will know you’re on the road?) When your phone senses you’re driving, it automatically goes into a special Do Not Disturb mode, blacking out your screen while you’re in motion. If anyone sends you a text, iMessage will respond with an automated message saying you’re on the road.

You can choose specific contacts to exempt from this function, so you can still get emergency messages. If your phone mistakenly thinks you’re driving but you're just a passenger in a vehicle, you can also exit out of the Do Not Disturb mode.

Your phone is always fighting for your attention, but it’s a lot easier to avoid temptation than to resist it, as recent studies have found. So software designed to keep you clueless about the texts that await you at every stoplight could make a huge difference, making the roads safer for everyone.

[h/t The Verge]