When a Catholic does something wrong, he or she says “mea culpa.” It means: it’s my fault, and I’m sorry about that.

It’s the human way to turn sad things into happy things. But what about faults that actually end up with good results? It turns out that we are surrounded by them. They are everywhere. There is a handy Latin phrase for that too: felix culpa. It means happy fault. This refers to something you did wrong or of which you are a seeming victim, something with immediate results that seem regrettable, but because of either a correction that took place in light of learning, or pure accident, something even better resulted that otherwise would not have taken place.

Here is an example. I have a favorite tea towel that is old and kind of grungy. I used it to clean a spill and tossed it into the direct-clothes hamper. Time passed. I had made a huge error. My favorite linen towel was filled with horrible black mold. Had I ruined it? I went for the bleach. I soaked the towel in it for 15 minutes. The thing came out wonderfully white and more beautiful than ever!

Felix culpa!

Also, I broke a water glass. Mea culpa. But this inspired me to look for plastic glasses that are pretty, elegant, and unbreakable. Now I have many of these, I love them, and I have no more fear of breakage. I live a better life as a result. Felix culpa!

I used to eat too much bread and it was making me sick. Mea culpa. But from this, I learned and now I eat much less and now I’m more healthy than I was before. Felix culpa!

I was hoping to listen to Mahler’s 6th symphony but I accidentally clicked on a Mahler song cycle. Mistake. As it turns out, I love the song cycle and I had not previously even heard of it. Felix culpa!

I failed to renew a prescription and it expired. Too bad. I had to go without. As it turns out, I didn’t need that medicine after all. My mistake became a great new discovery.

I forgot to pay a bill and the creditor was mad. My bad. Then I logged into my bank app and set the account on autopay. I’ll never make that mistake again, and now I don’t have even to worry about it. Felix culpa!

Mea culpa need never be the end of the story.I made a wrong turn on the way to work. Whoops. But in correcting my mistake I discovered an even faster and more elegant way to get where I was going.

If you think about it, our lives are packed with mistakes, errors of judgment, regrettable happenstances, genuine screw-ups, missed opportunities, and sins of commission and omission all over the place, sunup to sundown. The beautiful thing is that we learn, adapt, and improve, and this is invigorating and exciting. It’s the human way to turn sad things into happy things.

The more you think about this whole notion of a happy fault, the more it seems like a central institution in society. Some dude is a greedy jerk. But in a market economy, the best way to feed greed is by pursuing profitable service of others, by making new products and services. Everyone benefits. The dude’s private vice becomes a public virtue.

Let’s say you’re seething with hatred of an idea you read online somewhere. You lose your temper, and your heart is filled with fury and hate. That’s not good. But you set out to refute the idea, and, in so doing, you construct an impressive argument to the contrary. The result is a well-thought-out essay that helps you understand something even better. Felix culpa.

The beautiful dynamic here doesn’t have to be restricted to a single individual. Lots of times other people make mistake that we observe. We learn from what they did, and avoid it ourselves. This is how siblings learn from each other: one gets bad grades in school and the younger one vows not to make that mistake and gets great grades instead.

What turns a fault into a good result? Learning. Adapting. Changing.Or you want to start a business, but someone else beats you to it. They fail. You learn from their failure, and do it better as a result. Or a friend spends years in graduate school to get impressive credentials, but he can’t then get a job. You learn to take a different path.

What turns a fault into a good result? Learning. Adapting. Changing. And there is another feature: we can’t fully anticipate the consequences of all actions, decisions, and circumstances. Life is full of surprises, many of them happy. And many of them grow out of mistakes. Yay mistakes! Sometimes the thing that seems to impose suffering actually results in a better life.

What doesn’t kill us makes us stronger. 

Mea culpa need never be the end of the story. There is always another day in which we can know more and always an opportunity to live a better, happier life. 

This article originally appeared on FEE.org.