A new study published Friday in the Journal of Allergy and Clinical Immunology has found that exposing infants to allergens and bacteria during the first year of life can greatly reduce their chances of developing allergies and asthma.

NPR reported that the exposure to such things can help train a baby's immune system to ignore pollen and cat dander while fighting off bad bugs as well.

The study found that inner-city children developed a better immune system against wheezing and had less wheezing by age 3 after being exposed to cockroach, mouse and cat allergens. Exposure to bacteria such as Bacteriodes and Firmicutes helped children defend against allergies and asthma.

The children who were exposed to all of these things were found to of had the strongest immune system against such problems all together, according to NPR.

"It adds a degree of precision to the broad concept of the hygiene hypothesis," said Dr. Anthony Fauci, National Institute of Allergy and Infectious Diseases director.

According to NPR, Woods and his research team studied children in Baltimore, Boston, New York and St. Louis for eight years. The team collected dust samples in the homes when the children were infants and searched for allergens and bacterial DNA.

"It's the lack of those protective bacteria that may be the most interesting thing," Woods said.

However, according to the hygiene hypothesis, children who grow up in urban housing and are exposed early on to cockroaches and mice shouldn't develop allergies or asthma but are more susceptible to being sick, said Dr. Robert Wood, author of the study.

"We've talked for a number of years about how the inner city really does contradict the hygiene hypothesis," Woods said. "There's such a high rate of allergies and asthma in the inner city. The inner city must be a very dirty area where kids must be protected."

In recent years, cities have made improvements to clean up its inner-city areas as a way to reduce that asthma in citizens but based on the new study, the dirt in the air is a good thing for babies.

"We still believe that in kids with asthma that these allergen exposures are really unhealthy," Woods said. "But it would appear that if we cleaned things up as a preventative measure it would backfire terribly."