This is kind of cool. Raise your hand if you’ve ever gone on a lengthy road trip and found yourself falling asleep while driving. I know I have. Just last month I drove halfway across the country, and I caught myself dozing off on a number of occasions.

But there’s an iPhone app out that promises to make that a thing of the past. It’s called Drive Awake, and it uses eye-tracking technology to keep tabs on you while you drive. Close your eyes for too long, and the app will emit a shrieking audible alarm…

As you can see in the video, Drive Awake works by using your iPhone’s front-facing camera to monitor your eyes. If the app thinks you’re falling asleep, it produces an annoying alarm to get your attention and—get this—helps you locate a coffee shop.

Unfortunately, because the app was made by Cafe Amazon, the app will direct you to one of its nearest locations rather than a Starbucks or Dunkin’ Donuts—even if there are closer options. It’d be nice if the app was less biased, but still it’s a cool concept.

If you’d like to try Drive Awake for yourself, you can find it in the App Store, for free. Of course, because it requires a front-facing camera, it only supports the iPhone 4, 4S and 5. And you’ll probably get the best results if you have some sort of in-car mount.