Ever sat next to someone on a public bus or train who made you feel uncomfortable because they shouted at people, talked to themselves or smelled like they hadn’t showered in weeks? According to a new Yale University study, there’s actually an art to avoiding sitting next to people like that!

The study was led by Esther Kim, a sociologist who spent two years watching people use public transportation. And she says at some point, almost everyone participated in what she calls “non-social transient behavior," which is when we make an active effort to avoid other people.

Kim says the most common trick we use is to avoid making eye contact because for some reason, eye contact in public places seems to work like an invitation, saying: “I want you to sit here” or “please talk to me.” So instead of looking at people, we’ll pretend to fall asleep, rummage through our bag, or act busy by checking our cell phone. Another trick for avoiding uncomfortable people is make it look like someone else is already sitting there.

So why do we act like this? Why can’t we just let anyone sit next to us in public? Kim says it boils down to our desire to stay comfortable and safe. Her thinking is that we don’t want to share small spaces with people who are potentially dangerous, whether that means they pose a physical threat, or they smell so bad that we worry about catching a contagious disease.

And how do you prepare yourself, just in case your people-avoiding tricks don’t work? One man we read about says his favorite strategy is to always choose seats next to old ladies in public because in his experience “Old women rarely stink, and they’re rarely crazy!”