After a trip to the grocery store, it’s important to get fresh and frozen items into the fridge and freezer as quickly as possible. Just as important: loading and organizing them to prevent cross-contamination and keep food fresh as long as possible.

Here’s how to safely — and efficiently — fill your fridge to prevent cross-contamination or spoilage. You may even squeeze a few extra days out of a gallon of milk or bunch of broccoli.

Related: Food Safety Fails

Keep your cool

While any temperature below 40 degrees F is considered safe for prolonged storage, 36 to 38 degrees F is like the Baby Bear of refrigerator temperatures: just right. It gives you a safety cushion if the temperature rises while you have the door open and yet it’s warm enough that foods won’t freeze in cold spots.

The best way to make sure your fridge is not too hot or too cold is to use a refrigerator thermometer (if your refrigerator doesn’t have a built-in one). But don’t toy with settings while you’re filling the fridge with groceries. Most modern fridges are designed to adapt to changes in load and will automatically trigger the compressor to cool foods quickly.

Some fridges have a rapid cooling setting, which you can use to quickly cool off the inside after you’ve loaded it with room temperature groceries. Just don’t forget to shut it off. Otherwise, delicate foods like leafy greens can freeze.

If you’ve brought home any hot foods that you don’t plan to eat right away, don’t leave it out to cool down before you file it away in the fridge, advises the U.S. Department of Agriculture. Place hot items (that roasted chicken, for example) on an open shelf and leave as much room as possible around them so that the cold air can circulate and cool them quickly. Keep them away from highly perishable items like milk or meat.

Related: The Safe Way to Pack a Cooler (So No One Gets Sick)

Work your way to the bottom

Place foods that won’t pose a risk to their neighbors, such as jam, juice and other items contained in jars or cartons, on the top shelf. Jam also can be stashed on the door, along with condiments like ketchup, mustard and hot sauce.

Designate middle shelves for deli meats and dairy items. Store raw meat, poultry or seafood on the bottom shelf. If you packed them in separate plastic bags at the store (always a good idea), leave them that way to contain any drips. Freeze ground meat, chicken or seafood you don’t plan to use within the next day or two. Large roasts, steaks and chops can stay good three to five days in the fridge.

Arrange identical items (cartons of milk, for example, or containers of yogurt, cream cheese or instant pudding) in rows, front to back, with the newest ones in back. That way you’ll use up the oldest ones first.

Use deli drawers to avoid drips

Most refrigerators have meat or deli drawers. On models with a bottom-mounted freezer, these drawers typically are just clutter catchers designed to help you organize the contents of your fridge. That said, they’re a great place to stash cold cuts, cheese or any ready-to-eat food to protect them from leaking drips from leaking meats.

The meat storage drawer in many newer side-by-side or French door refrigerators (which have a freezer on the bottom) have dedicated temperature controls. If yours does, use it for its intended purpose — to stash raw meat. Because meat freezes at a much lower temperature than most other fresh foods, you can set it to the coldest setting (two to six degrees cooler than the rest of the inside of the fridge) without worrying that your iceberg lettuce will become, well, an ice berg.

Related: 5 Mistakes You’re Making with Chicken and Meat

Crispers drawers: practice segregation 

If you’ve ever placed a bunch of spinach or head of broccoli in a crisper drawer only to have it emerge limp and lifeless a few days later, here’s why: You probably put it in the wrong drawer. Most refrigerators have two crisper drawers, one for fruit and one for veggies. That’s because, as a general rule, veggies crave high humidity and fruits tend to thrive in low humidity. If your crisper drawers are labeled — one for vegetables, one for fruit — use them that way.

Some refrigerators’ crisper drawers have variable humidity controls. Take advantage of this feature if your fridge has it: Put each one on the highest setting and store veggies and fruits separately in their dedicated drawers.

One exception: If your crisper drawers are below the meat drawer or the bottom shelf. Unless raw meats are adequately sealed, their juices can drip and contaminate foods nearby and below them. If that’s the configuration in your fridge, use one or both of the drawers for raw meat and store fresh produce on a shelf above them. Alternatively, take the time to double wrap meats and other animal proteins in extra layers of plastic wrap and/or set them on a flat tray with raised sides.

Don’t be a doork

For decades, appliance designers have struggled to maximize storage space on refrigerator doors — which means chances are good the door of your fridge has a built-in butter tray and maybe even a slot for milk or an egg dish. The trouble is, the door is the warmest part of the appliance. And when you open it frequently the temperature throughout your refrigerator can easily rise above 40 degrees, increasing the risk that items stored on the door will spoil more quickly.

The better way: Stick butter, milk and other dairy products on a top or middle shelf, which tend to be the coldest areas in a refrigerator. Place eggs above raw meat and in their original container for two reasons: Number one, egg cartons are designed to capture leaks from cracked or broken raw eggs. Number two, egg cartons typically are stamped with essential information in the event of a recall.

Here’s what can be safely stored in the door: wine, soda, seltzer, bottled water, condiments, olives, relish or pickles.

Related: Food Safety Fails

Paul Hope, a trained chef and DIY enthusiast, has restored two houses and writes about food and homes.