Chade-Meng Tan, a former engineer, joined Google in 2000 as employee number 107. Though he played an instrumental role in building Google’s mobile search function, among other technological feats, he’s better known for the mindfulness classes he later led for employees. The role earned him the job title of Jolly Good Fellow (Which Nobody Can Deny), which he parlayed into a mindfulness institute geared toward corporate types.

In his latest book, Joy on Demand, the Google veteran describes his path from someone who was “constantly miserable” to a much happier guy. How did he get there? Sometime in his mid-20s, he discovered that he wasn’t stuck with self-loathing; temperament, he found, is malleable.

Successfully reshaping your mindset, he argues, has less to do with hours of therapy and more to do with mental exercises, including one that helps you recognize “thin slices of joy.”

“Right now, I’m a little thirsty, so I will drink a bit of water. And when I do that, I experience a thin slice of joy both in space and time,” he told CBC News. “It’s not like ‘Yay!”” he notes in Joy on Demand. “It’s like, ‘Oh, it’s kind of nice.’”

Usually these events are unremarkable: a bite of food, the sensation of stepping from a hot room to an air-conditioned room, the moment of connection in receiving a text from an old friend. Although they last two or three seconds, the moments add up, and the more you notice joy, the more you will experience joy, Tan argues. “Thin slices of joy occur in life everywhere… and once you start noticing it, something happens, you find it’s always there. Joy becomes something you can count on.” That’s because you’re familiarizing the mind with joy, he explains.

Tan bases this idea on neurological research about how we form habits. Habitual behaviors are controlled by the basal ganglia region of the brain, which also plays a role in the the development of memories and emotions. The better we become at something, the easier it becomes to repeat that behavior without much cognitive effort.

Tan’s “thin slice” exercise contains a trigger, a routine, and a reward—the three parts necessary to build a habit. The trigger, he says, is the pleasant moment, the routine is the noticing of it, and the reward is the feeling of joy itself.

The exercise sets the brain up well to slip easily into more formal meditation practices. “Noticing sounds trivial, but it is an important meditative practice in its own right,” writes Tan, adding that “noticing is the prerequisite of seeing. What we do not notice, we cannot see.”

Other scientific evidence aligns with Tan’s theory. A small study by psychologists from Loyola University published last month in the journal Aging, for instance, showed that among adults over age 55, those who reported a better ability to savor life were more likely to report higher life satisfaction, regardless of ill health. For those less able to relish small events, poor health made all of life seem drearier.

People seem to get better at savoring the moment as they age. A small 2014 study by marketing professors at Dartmouth College, published in the Journal of Consumer Research, found that older people are more likely to define who they are by naming everyday positive moments. Those in their teens and twenties cited extraordinary moments, such as graduation or a first car, as defining. “Ordinary moments that make up everyday life tend to be overlooked when the future seems boundless,” the authors wrote. “However, these ordinary experiences increasingly contribute to happiness as people come to realize their days are numbered.”