The summer months are great, but one of the downfalls of the warmer weather is that it brings around a lot of disease carrying mosquitoes. These annoying bugs bite humans and tend to leave itchy marks behind. We’ve tried a lot of different things to keep mosquitos away from our body, including swatting at them.

Now, research is suggesting that though it might seem futile at first, swatting at mosquitoes is actually an effective method. What’s even better is that even if you miss when swatting at them, it can still help.

A study that was crafted by several scientists led by Jeffrey A. Riffell suggests that mosquitos will learn to avoid a human that presents a danger such as swatting. It sends a signal that you’re not going to tolerate being the host for these pesky mosquitoes, and they will become more likely to avoid you. The mosquito will remember your scent and the vibrations from the swatting, moving on to another potential host.

To craft their study, Dr. Riffell and his team placed mosquitoes and different scents into a vortex. In this vortex, they were able to create vibrations that resembled humans swatting without actually hitting them. Within 15 minutes, mosquitos learned to stay away from those that were swatting, associating the scent with potential danger.

You’d think that mosquitoes would have a very short memory, but researchers found that they were actually able to carry this memory for at least 24 hours. We’ve also found out who is more likely to attract mosquitoes in the first place. Those that emit more carbon dioxide become instantly attractive to mosquitoes. This means that pregnant women and those that have been drinking alcohol are more likely to be bit. High temperatures and sweat also increase the likeliness of being swarmed by mosquitoes.

All in all, Riffell and his team tested out nearly 3,000 mosquitoes to find out how they learn and become attracted to certain hosts. Clement Vinauger of Virginia Tech said that “Understanding these mechanisms of mosquito learning and preferences may provide new tools for mosquito control. For example, we could target mosquitoes’ ability to learn and either impair it or exploit it to our advantage.”

Affecting the dopamine levels in mosquitoes was found to be effective in preventing mosquitoes to learn a host’s scent. “Now that we have a better understanding of what mosquitoes are capable of, we need to investigate how to apply this knowledge to refine our control strategies and fight more efficiently against the disease that these mosquitoes transmit,” said Chloe Lahondere, also of Virginia Tech.

She added that “Unfortunately, there is no way of knowing exactly what attracts a mosquito to a particular human – individuals are made up of unique molecular cocktails that include combinations of more than 400 chemicals. However, we now know that mosquitoes are able to learn odors emitted by their host and avoid those that were more defensive.”

The hope is that this research opens up some secrets on how to prevent mosquitoes who carry the West Nile virus from biting humans. The researchers didn’t use mosquitoes that carried this disease for this study, but are optimistic that the future could contain these secrets. As of now, mosquitoes are the deadliest animals in the world with more than 600,000 people each year being killed from disease carrying mosquitoes.

As for now, Riffell suggests to keep swatting. “If there are mosquitoes around and you’re shooing them away (and you’re mean) you could encourage your friend to talk a lot and move around and sweat, and they’ll probably avoid you and go to your friend.”