Halloween is that sweet time of year when children can collect and eat as much candy as they want.

But with the obesity rate triple what it was a generation ago, and the number of cavities among children increasing for the first time in 40 years, some health experts consider the candy-focused holiday a nightmare. The American Dental Association (ADA) launched a “Stop Zombie Mouth” campaign, offering coupons for the game Plants vs. Zombies that parents can distribute to trick-or-treaters instead of candy so that kids are not as prone to developing cavities, or, as the dentists are calling them, “zombie mouths.”

Based on the nutrition labels on popular candies, the average child accumulates 3,500 to 7,000 calories worth of treats on Halloween night, according to Donna Arnett, Ph.D., chair of the Department of Epidemiology at the University of Alabama-Birmingham’s School of Public Health. According to a recent report, a 100-pound child who consumed all of those treats, or 7,000 calories, would have to walk for nearly 44 hours or play full-court basketball for 14.5 hours to burn those calories. And the dangers aren’t just sweets-related: studies show that since children are walking neighborhoods in search of treats, there are more child pedestrian accidents on Halloween than any other day of the year.

Still, the holiday shouldn’t be all spooks and no fun. If your children generally eat well all year long, then experts say that there is nothing wrong with letting them eat candy on Halloween night and a few mini pieces daily afterwards. The key, of course, is moderation. Family nutrition experts shared these tips with TIME Healthland about how parents can incorporate healthy foods, even workouts, into trick-or-treating — and some ideas for what to do with the rest of the loot when the trick and treating is over.

If kids are full before they go trick-or-treating, then they will eat fewer pieces of candy afterwards. “Consider having your kids eat something healthy before they go out so they aren’t tempted to eat the candy along the way,” said Vandana Sheth, a registered dietician based in Los Angeles.

Hand out non-sugary foods and toys

Nutritionists suggest some more wholesome treats that parents could give trick-or-treaters. Kristi King, senior pediatric dietician at Texas Children’s Hospital, thinks animal crackers, mini rice cereal or granola bars, whole grain cheddar cheese crackers, and sugar free hot chocolate packets, make good treats. Sheth recommends pretzels, apples, tangerines, fruit leathers, or a trail mix of whole grain cereals. She also says kids will usually take cool toys over candy if given a choice, so she advises parents to consider pencils, erasers, stickers, tattoos, glow sticks, and Play-Doh containers. “Often [children’s] excitement is in collecting the candy, rather than eating the candy,” Sheth said.

Sometimes it’s what’s on the outside that counts more than what is inside. “It’s all in the packaging with kids,” said Angela Lemond, a registered dietician in the Dallas area. “You can make healthy treats, but you can package them in a really cool, spooky way that will make them more likely to consume it.” Lemond suggested freezing frozen yogurt in small paper cups and placing them in a cooler with dry ice for a spooky, smoky effect. Decorating the cooler to look like an old chest can make it more fun for kids to dig into the healthy treats.

Cheddar popcorn balls in a plastic baggie sporting a smiling face can be instant pumpkin heads that are also a hit with kids who won’t miss the sugar of a sweeter treat.

King encourages parents to make their children walk from house to house instead of driving them. Parents can even encourage siblings or friends to wear pedometers or activity meters and start a friendly competition for who can be the most active while they are collecting candy.

Keep your favorite sweets. Hide the rest…

Some nutritionists suggest that a little goes a long way and say it’s best to allow kids to have 1-3 pieces of candy a day, starting with lunch at school, as an afternoon snack, or after dinner, making it a regular part of meals. The rest of the candy can go in the freezer so that it’s out of sight and out of mind.

Parents should be just as vigilant about their candy consumption as children, says Karen Ansel, a New York nutrition expert. “Kids go to school all day, and parents are often home with the candy lying around,” she said. “If you’re buying Halloween candy to hand out to trick-or-treaters, buy your least favorite ones so that you are not tempted to eat them.”

When children get back home from trick-or-treating, have them make two piles: one for the candy they want to keep, another for the candy they will not eat. Consider donating the second pile to a local senior citizens home, food pantry, Ronald McDonald House, or children’s hospital.

You can even make money off your stash and make a U.S. soldier’s day at the same time. This year, more than 1,000 dentists nationwide are buying candy from kids — $1 per pound — and then shipping it to U.S. troops overseas via Operation Gratitude as part of a Halloween Candy Buy-Back program, started by Wisconsin dentist Dr. Chris Kammer. He says that soldiers will receive toothbrushes, floss, and mouthwash with each handful of candy so that they can brush thoroughly afterwards. “You can’t get a cavity in a short amount of time with a handful of exposures to candy,” he says.

In addition to the cash, participating dentists will also give kids treats, such as restaurant coupons and Xylitol gum made with a naturally-occurring sweetener that may prevent tooth decay and reduce cavities. “We replace some of their candy with a healthy candy alternative,” Kammer said. And in the process, children can learn a valuable lesson about giving.