Sleep apnea affects more than 18 million Americans and can lead to attention deficit disorder, high blood pressure and even diabetes. Going to a clinic to be diagnosed can be costly and time consuming.

But now there’s an app in the works that can help.

Doctors at the University of Washington Medicine Sleep Center are developing the ApneaApp. It’s currently pending approval from the Food and Drug Administration and the release date hasn’t been announced.

Here’s how it will work: The user opens the app and places his smartphone next to his bed before going to sleep. The app emits frequency-modulated sound signals via sonar to detect even the smallest chest and abdomen movements as you breathe.

The team developed algorithms to identify various sleep apnea events during sleep using the sonar readings, including obstructive apnea and hypopnea.

The app will be a screening device to help you decide if you want to seek an appointment with a sleep medicine doctor.

Before getting treatment, you would need to do an overnight sleep study to confirm the app’s findings, but this would be a first step.