iPhone 6s and iPhone 6s Plus aren’t marketed as water-resistant smartphones, but tests have shown they don’t mind a bit of water. Now a new teardown of Apple’s latest smartphones reveals the steps taken to minimize the risk of liquid damage.

The iPhone 6s surprised us all in a recent water test after enduring a whole hour in a bowl of water and coming out alive. Everything continued to work after the test, including the display, cameras, and even the headphone jack and Lightning connector.

Intrigued by this, the team over at iFixit decided to teardown the device a second time in an effort to reveal its secret sauce.

Apple “didn’t just run a strip of glue around the existing display like they were caulking a bathtub,” iFixit says; the company also modified the size of the iPhone’s frame ever so slightly (0.3mm) to ensure there was enough of it to create a seal between the display and the body of the phone.

In addition, every cable connector on the logic board is surrounded by “what appears to be a tiny silicone seal,” iFixit adds.

It should be noted that there still ways in which liquid can enter the iPhone 6s — such as through its SIM card slot, headphone jack, and speakers. Apple doesn’t appear to have taken any steps to make these water-tight; most of them are identical to the parts used in last year’s iPhone 6.

But thanks to the changes the company has made, iPhone 6s and iPhone 6s Plus are at least more water-resistant than previous iPhones. We still don’t recommend you get them wet intentionally, but should you have a spill, they’re more likely to survive than their predecessors.