Algorithm can detect when you're distracted while driving