When Apple introduced its new MacBook Pro with Touch Bar, we assumed the experience was powered entirely by macOS. It turns out, that’s only partially true.

According to Apple developer Steven Troughton-Smith, the Touch Bar is actually run by modified version of watchOS, which is itself a modified version of iOS.

This is made possible by a new T1 chip, which Apple revealed runs independently of macOS. Troughton-Smith explained it also manages the security of input devices, including Touch ID, the Touch Bar, and the FaceTime camera.

Troughton-Smith explained some of the technical aspects on Twitter:

iOS repurposed for MacBook Pro

It’s a clever and ingenious solution from Apple. It also makes you wonder what other experiences Apple can repurpose iOS for.

The new MacBook Pro’s Touch Bar supports multitouch and is capable of dynamically changing depending on which application you’re using. Apple showed the tiny bar working beautifully with its own apps but said third-party developers—including Microsoft—can also tap into the Touch Bar.

You can pre-order the revamped MacBook Pro now.