We have all experienced the “aha” moment when a joke suddenly makes sense, and scientists have long tried to figure out what happens in our brain during that crucial split second. Now a researcher at the University of Michigan at Ann Arbor has found a window into that state of mind: the eyes.

Humor psychologist Richard Lewis (no relation to the comedian) was intrigued by past studies showing that a person’s pupils dilate in proportion to the funniness of a cartoon he or she is looking at. He took a closer look at this eye reflex by showing volunteers cartoons from the New Yorker magazine and using an eye-tracking device to monitor their pupil dilation and eye movements. The subjects’ pupils dilated about half a second after their gaze fell on the regions of a cartoon that were critical in making it funny—a period that is very similar to the time it takes our brain to derive meaning from words we read. “The nice thing about combining pupil dilation with eye tracking,” Lewis explains, “is that we can now pinpoint the ‘got it’ moment.”

Determining this moment with pupil dilation, which Lewis thinks is most likely a basic arousal response, could aid researchers who investigate humor-related brain activity with MRI or electroencephalography. So far scientists have found several brain areas, including the reward system, to be associated more generally with our sense of humor; it appears we do not have a distinct neurological funny bone.

But why do we have a sense of humor in the first place? According to Lewis, psychologists are just beginning to discover its relation to other cognitive processes that seemingly lie outside the realm of the funny, such as our ability to gauge the thoughts of others. “This is all part of looking at the state humor puts you and your brain in and how that affects other things you do,” Lewis says. “This will help us piece together the puzzle of what humor is for.”