By Cathy Zhu

The morning after a blackout is mystifying. The word “uh-oh” comes to mind (more accurately: “Nnnngh... uh-oh”), followed by frantic texting to figure out just what happened. And while we can’t tell you just what went down after that fourth shot of tequila, we can tell you what happened in your brain to make those memories pull a Houdini.

Your Brain on (Too Much) Alcohol

Memories usually follow a steady train through formation: They start in immediate memory; when held onto, they turn into short-term memory; from there they make the leap into your long-term memory.

When you rapidly consume a bunch of alcohol, a roadblock basically goes up between the immediate and short-term memories, says Mark Rose, a licensed psychologist and addiction researcher. To go a bit more in-depth, when they’re exposed to alcohol, the brain receptors that create memories in the hippocampus shut down. So you can remember things in the 30- to 90-second “immediate” span before the blackout, but that’s it.

Depending on how much those receptors are disrupted, a blackout can be either partial or complete. Partial blackouts are scientifically known as “fragmentary” and commonly known as “brown-outs”. Complete blackouts are scientifically called “en bloc” and sometimes referred to as “that never happened”.

Interestingly, it’s more about how quickly you drink than how much you drink, Rose says.“For example, a person who slams three drinks in a row is more likely to have a blackout than somebody who acquires twice their blood alcohol concentration (BAC) over a longer time.” 

Also, even if you can’t remember anything from the night before, it doesn’t mean you were a walking, talking mess. Since alcohol affects our cognitive functions first, it's possible that your total BAC rose quickly enough to trigger the blackout response before hitting your motor functions, Rose says. In that case, you may have appeared only minimally impaired (not blotto and texting exes).

Your Action Plan

While that may be good news to anyone who's blacked out, if you have a friend who tends to go overboard at the bar, how can you tell if he or she has had one (or three) too many?

Ask them about something that happened 15 minutes ago, Rose says. (That's that "immediate" memory zone.) If they’re drawing blanks, you’re in the dark zone, so keep them from doing anything they might regret.

If you're the one who tends to hit the bottle hard, remember that drinking on an empty stomach or medications like antidepressants or sleep aids isn’t a good idea, as it can increase the risk and severity of blackouts. And ladies, unfair as it is, studies have shown that women are more likely to black out than men, because their brains recover more slowly from cognitive impairment and they process alcohol at a slower pace, meaning more enters their bloodstream.

This article originally appeared on Greatist.com.