Americans waste a lot of food—some 35 million tons get thrown into the garbage each year. Part of this is just because consumers can’t figure out whether their food is still good or not. Food labels are confusing, and people understandably would rather toss their nearly-full gallon of orange juice after the date stamped on the bottle than risk ingesting something spoiled. It’s hard to tell whether that “best before” stamp means your product is actually unsafe after that date, or if it just might look a little less pretty than it did when it was brand new.

With better technology, however, those unreliable “use by” dates might not be needed at all. A sensor would be able to tell you whether your particular cut of chicken was still fine to eat, eliminating the need for a system that relies purely on how many days have passed since the item left the warehouse. Here are four perishable products that might soon come with their own freshness sensor: 

1. Eggs

In 2012, a Tufts University scholar created an edible silk sensor that sticks directly onto food to monitor the freshness of bananas, eggs, cheese, and milk. It can pick up on chemical and tactile changes that indicate that the food is less than fresh, so that you don’t end up with a fridge that smells like rotten eggs. 

2. Fruit

Grocers ideally want to sell their ripest fruit first, since once their produce starts rotting, they have to throw it away. To help keep food from being wasted, chemists at MIT created a tiny sensor that can monitor the ripeness of fresh fruit by detecting ethylene, the hormone released as fruit matures. These computer-chip-sized sensors, unfortunately, aren’t edible. 

3. Meat

No one wants to splurge on a steak or salmon filet only to find it’s gone bad a day later. Earlier this year, those same chemists from MIT developed a portable sensor that detects the gases released when meat rots. The device could be used in packaging for meat and fish, providing real-time information about the product’s freshness instead of relying on a vague date. 

4. Milk

While it’s usually fairly easy to tell whether milk has gone sour by its scent, poking your nose in an old milk jug can also feel like being hit with a truck full of sewage. Engineers at the University of California, Berkeley and National Chiao Tung University in Taiwan are working on a smart sensor cap for milk cartons to alert you to spoilage wirelessly. Eventually, these caps could be used to monitor the freshness of perishables before they leave the supermarket shelves, helping customers know that they aren’t going home with sour cream rather than 2 percent.