There's a new smartphone app for drivers having an 'oh crap!' moment behind the wheel. The 'Oh Crap' app is designed to help drivers being pulled over for suspected drunk driving.

It was put together by lawyers in Iowa as a way to educate the public of their rights if they are pulled over. It also helps to document the stop for lawyer's use later.

"We want to educate citizens on what their legal rights are and are not in the state of Iowa and eventually everywhere else. But we also want to serve as a tool to allow people to document their invocation of their rights and their use of legal protections that exist," said Bob Rehkemper, an attorney and co-creator of the app.

The app gives tips to drivers being pulled over like: "shut up" and "be polite." There's a feature to calculate your blood alcohol content and a button that contacts an on-call lawyer. Plus, there is a whole section on basic legal rights when being pulled over.

One of the most important parts of the app is the recording function, which starts when someone pushes the 'Oh Crap' button. It records 15 minutes of audio or until the person hits stop. Later lawyers are able to access that audio to determine if any rights were violated and if they were they can build a defense in court.

Right now the app is only valid for Iowa law. Not all states have one-party recording consent laws. This means if someone were to try to use the recording function of the app in a state that requires two-party consent, the recording wouldn't be able to be used in a legal case. However, Rehkemper said that they are working with attorneys around the country to create a nationally valid app.

Rehkemper said the national version of the app will have a GPS function that determines what recording laws are in the state where the driver is located and the nearest participating attorney. But he said that app is still a month or so away.

"If there are mistakes that are made, if rights aren't honored, if they're not respected then that's where a valid defense can come up," Rehkemper said.

Iowa law enforcement is aware of the app and one State Patrol officer is not a fan.

"To give people tips to not be pulled over for drunk driving, we don't like to hear that. Because if someone is drunk driving we want them off the roadway before we lose an innocent life," said Sgt. Scott Bright.

The worry is it could make roads less safe for drivers. "People start looking at this app and possibly think if I'm behind the wheel I can just follow some of these steps and maybe I can get away with it. They're going to take their own risk into their hands," Bright said.

The "Oh Crap" app is free and available on both Android and iPhone devices. You can check out more information here.