After college kids who have three too many all-you-can-drink mimosas and activists who believe Mother’s Day brunches are the best places to take a stand about animal rights, nothing ruins breakfast like spoiled milk. Researchers at the University of California, Berkeley and the National Chiao Tung University in Taiwan feel your pain — so they’re developing 3-D “smart caps” to sense bacterial levels in containers (specifically with milk and juices in mind).

By incorporating microelectrical components into the caps, the devices can measure “capacitance changes of the liquid food due to its deterioration over time,” the researchers wrote in a recent study in Microsystems & Nanoengineering. It’s a little more reliable and less potentially pungent than the ol’ sniff-to-see-if-this-is-still-OK test.

Even if you’re lactose intolerant, the device could change the way you consume food. The researchers say that the innovation could have broader applications beyond milk, by, for example, checking the app while you’re in the grocery store for food on the shelves. Drink up.

Photos via Flickr.com/Jeepers Media