Tudor Cobalas nearly crashed his car while driving and texting on his phone.
It was this near-death experience that inspired him to turn the smartphone from a weapon of mass distraction into a tool for safer driving.
Mr Cobalas, 30, from Romania, developed SafeDrive, an app that rewards drivers for ignoring their phones while driving.
Once a driver exceeds 6mph (10kmh), the app launches a "Release" button on the screen, effectively locking the phone. Driving without checking the phone generates points that can be converted into shopping discounts in the SafeDrive Marketplace.
Pressing the Release button while driving wipes out the points earned during that journey.
It's a simple idea that has attracted nearly 100,000 users globally and 30 commercial partners, from insurance companies to retailers.
Mr Cobalas has also developed an app, Milez, aimed at teenage drivers.
"It was a response to questions from parents in the US who wanted to educate their children, young drivers," he says.
Again, the idea is simple - teenage drivers are financially rewarded by relatives and friends through the Milez app if they drive safely.
Mr Cobalas's native Romania has a particularly poor record when it comes to road fatalities.
In the European Union as a whole, the average number of road deaths per million inhabitants is 51.5. In Romania, it is nearly double that figure at 95.
Worldwide, about 1.25 million people die each year as a result of road traffic accidents, according to the World Health Organization (WHO).
"Smartphone distraction" is blamed for an increasing number of accidents. Drivers using a mobile phone are four times more likely to be involved in a crash, the WHO says.
That is why a growing number of technology entrepreneurs are trying to tackle the problem.
"Although smartphones are rightly blamed for an increase in distracted driving, we wanted to show that smartphones could be used to make drivers better," says Hari Balakrishnan, chief technology officer of Cambridge Mobile Telematics, a US company that has developed an app called DriveWell.
The app measures all aspects of driving such as hard braking, abrupt acceleration, sharp cornering and speeding.
But it also monitors how often drivers are distracted by their phones and generates a "safety score" at the end of each trip.
The company emerged from a project at the Massachusetts Institute of Technology run by Mr Balakrishnan and co-founder Sam Madden.
The free app features competition leader boards that enable drivers to compete with their friends, family and colleagues, as well as personalised safer driving tips.
Good safety scores can earn drivers discounts on their car insurance with some insurers, Mr Balakrishnan says.
Last year the company launched a competition to find Boston's safest driver. Nearly 5,000 people have signed up, and 98 have been awarded more than $3,400 in prizes.
Data from 40,000 DriveWell app users around the world demonstrate its effectiveness, says Mr Madden.
"By day 30, we see a 35% reduction in phone use and a 20% reduction in the number of hard braking events," he says.
Nick Lloyd, road safety manager at the UK's Royal Society for the Prevention of Accidents (Rospa), agrees that apps designed to reduce driver distraction show promise.
But he points out that as use of these apps is voluntary, "we do not know what kinds of drivers are likely to choose to use these apps".
In other words, dangerous drivers are precisely the ones who do not think they drive dangerously and thus don't think they need any help.
The problem with smartphones is that they constantly buzz and ping with notifications - they are designed to distract us.
So Rob Joseph, 27, an app developer based in London, developed ReadItToMe, an Android-only app that turns written messages into the spoken word, and vice versa.
"The idea initially came up when I was receiving text messages while on the London Overground but was too squished in among people to be able to pull out my phone to check them," he says.
The app can read any text notifications your phone receives, including emails and those from social messaging apps such as WhatsApp.
At present it can read in any language but reply in only a few.
"I feel that receiving messages you can't check because you're driving is just as much a distraction as texting while driving," says Mr Joseph. "You're constantly thinking: 'who could it be?' and you don't want to wait until you next pull over."
"While some newer cars offer the option to read SMS messages, they don't offer the option to reply, so something like ReadItToMe bridges that gap," he says.
The app, which has 22,000 active users, is free to use for reading SMS messages, or £1.49 if you want to use voice reply or other apps.
But does hands-free really make you accident-free?
"There are some safety concerns about safe driving applications, such as those which read text messages out loud to the driver, as this could be distracting," says Rospa's Nick Lloyd.
And the National Safety Council suggests that the use of hands-free devices still requires you to multi-task mentally, affecting a driver's ability to respond quickly to hazards.
Perhaps the answer is switching off phone notifications altogether before every journey.