Apple is working on a feature that will allow the Apple Watch to detect blood oxygen levels for the first time, according to snippets of iOS 14 code obtained by 9to5Mac.

Currently, Apple Watches Series 1 and later can notify wearers when they detect irregular heart rhythms that suggest they might be at risk of atrial fibrillation (AFib). They can also send alerts when a user’s heart rate remains above or below a BPM (beats per minute) of their choosing while they’re inactive. With the capacity to monitor blood oxygen levels, Apple Watches could also alert wearers who are at risk of respiratory or cardiac arrest.

Blood oxygen levels can also be useful to athletes, as they can indicate how well their bodies adjust to varying activity levels.

It’s unclear whether this feature will be a unique component of the upcoming Apple Watch Series 6 or part of watchOS 7, which would allow it to roll out to older Apple Watches as well. We expect to see both new releases this fall. An iFixit teardown revealed that the original Apple Watch’s hardware is capable of monitoring blood oxygen levels, though it currently doesn’t offer that feature.

Blood oxygen monitoring is one of a number of functions Apple is working on to expand its smartwatches’ health capabilities. According to the snippets, the company is also working on fixing a bug in the electrocardiogram (EKG) feature that caused Apple Watches Series 4 and 5 to take inconclusive readings at heart rates between 100 and 120 BPM. Last fall, an App Store listing hinted at an unreleased Sleep app, which would allow users to set bedtimes and wake-up times as well as bring long-awaited sleep tracking to the Apple Watch.

Apple would not be the first company to implement this feature for wearables. Fitbit rolled out blood oxygen monitoring to its Versa line as well as its Charge 3 and Ionic fitness trackers earlier this year. The data is only available in the sleep-tracking portion of Fitbit’s app, however, and in a very generalized chart; you can’t see exact or hour-by-hour metrics. It’s likely that Apple could offer a more advanced version of this feature. Fitbit doesn’t intend for its data to be used for medical diagnoses, while Apple has heavily marketed its recent Apple Watches as devices that can inform conversations with doctors. Its EKG app has also been cleared by the Food and Drug Administration for medical use for users over 22.