The second I hit the rail, I knew something was wrong.

It was my final slopestyle run at the 2014 X Games, and I was going for my third straight gold medal. You may not know what slopestyle is, so let me explain: Imagine an obstacle course of rails and ramps spread over one long downhill run, where judges award points for a snowboarder’s tricks based on accuracy and degree of difficulty. There’s a lot of speed and air involved, two ingredients that make it one of the more dangerous winter events. It’s also the most fun and the most creative, but that’s just one dude’s opinion.

So I only had one run left, and I was sitting in second place. I knew I had to go all-out to put myself in the running for gold, but I just didn’t have enough air coming off the ramp. All of a sudden, the back of my snowboard clipped the rail and I flipped over, smashing the side of my body into the bar. Somehow I actually managed to land and stay on my feet, but as I rode down the mountain, I knew I wasn’t just winded. Something worse had happened. Later that day I got an X-Ray and I found out I’d broken my rib.

A broken rib. And it was the worst timing. I was 20 years old, the gold medal favorite for the Sochi Winter Olympics, and I was staring up at a hospital ceiling. The Olympics started in 10 days.

I know some people don’t take snowboarding seriously as a sport. They think that we just get to chill all day on the mountain and hang out at the ski lodge all night. I mean, listen, I grew up in Canada, where everybody is practically born with a hockey stick in their hand. When I quit hockey as a kid, my parents would say to other parents, “Mark snowboards now,” and the other parents would be like, “Yeah, our kids do that too — on holidays.” My folks had to explain that I actually got paid to do it.

I’ll be the first to admit, snowboarding is a much more laid back lifestyle than playing hockey or basketball or other sports for a living. I get to go all around the world with my friends, from Japan to Switzerland to Aspen, just trying to find the best powder. But at the same time, we’re working hard to be creative and constantly reinvent the sport. That’s why I love it. We have that luxury of saying, “Today I want to go out and try this new trick that no one’s landed before,” and we’re always pushing the boundaries.

When I’m preparing for a contest, I’m just working my tail off. Between practice, the gym, physiotherapy, signings, and interviews, it’s just go, go, go, all day. It can get pretty rigorous. And now with the Olympics and all the hands involved in it, snowboarding is more serious than ever. It’s definitely much more strategized and much more of a mental game. When I was younger, my attitude was, “Get on the hill and go!” Now, it’s more strategic, and there’s more and more preparation that goes into competing.

But I’ve never had to work as hard as those 10 days before the Sochi Olympics. Right when I got the X-Ray, the doctor told me I wasn’t going to be able to compete at Sochi. But I knew I had to. Some way, somehow. I got a hold of my doctor later that night, and this time he told me that it wouldn’t injure me more if I tried to compete. He said it wasn’t realistic to compete in the Olympics with a broken rib but that I could try. That’s all I needed to hear. Still, I was facing an uphill battle. We’re talking about a Mt. Everest type of battle. Those last couple weeks before a major competition are supposed to be when you’re perfecting your moves. You’re supposed to be putting in full days on the mountain and in the gym. Here I was, on the eve of the Olympics, barely able to take a shower without debilitating pain. I thought I had no chance, for sure.

I flew to Austria the next day (definitely the longest flight of my life). Once I arrived and tried to hit the mountain, I couldn’t even get up on my board. I ended up not leaving the lodge much at all. Every day, I was just with my physical therapist — an hour in the pool, an hour in the gym, two hours on the table — the most intensive rehab you could imagine. The pool was the best because it’s really low impact. With a broken rib, all your muscles are trying to operate as a cast around the injured area. We were just trying to strengthen and loosen those muscles up to get them more mobile. But still, pain was the major issue. I just needed to learn to deal with it. I was wincing if I even turned over in bed.

I finally began to get stronger, and I started to bike. I had to get the most out of every 24-hour period because there was no time left. By the time I had to go to Sochi, I was squatting and jumping a little bit without a board. Not exactly gold-medal moves. But the pain was still there and I was starting to feel pretty bummed. The day before competition opened, I tried to get on the board, but the pain was still too intense. After all that work, it was crushing to think I might not even be able to take a run at the Olympics. Even if I did compete, I wouldn’t get any chance to test out the slope before the first round. It was going to be like a bobsledder going down a course without studying it. Still, I just kept trying to put it out of my mind and focus on rehabbing.

It’s crazy. Until something goes wrong, it’s smooth sailing. You have the luxury to worry about the smallest things. Then when something actually goes wrong, like an injury, you realize that you have to just go back to the basics and start from the ground up. You have to dig deeper than you ever thought you could. Something weird happened right before I took my run. The injury actually ended up taking the pressure off of trying to go get a gold medal, because it became more like, “Let’s get better so I can try and compete.”

In the 2014 Sochi Olympics for slopestyle, there were 29 snowboarders competing. You get two runs in the qualifying round, and the four boarders with the best single overall run automatically move on to the finals. The rest have to go to the semifinals. Each of those guys had spent the past two weeks practicing their moves over and over, putting on the finishing touches. I had spent the better part of those two weeks in a pool. I still hadn’t even been on the course yet.

During the qualifying round, I fell on my first run. I dug deep in myself, though, and managed to put up a pretty good second one, so I was feeling good. I kept grinding through the competition, getting stronger each of the 15 days of the Olympics. The semifinal has the same system — two runs, and the four snowboarders with the best single overall run get to move on to the final. My first run was pretty shaky, but I managed to stay on my feet. My second run was solid and was enough to make it to the finals.

I couldn’t believe where I’d made it. After all of that, I was competing with 11 other snowboarders for a spot on the podium.

On the first run of the final, I fell. So it all came down to the last one, the make or break run. Going down the hill, everything went away — the pain, the pressure to win, the agony of the past 15 days. I was by myself flying down the slope, nailing every rail and jump, going back to what I love most about snowboarding — just having fun. The judges’ score: 88.75. It was good enough for a bronze medal. Two weeks ago, sitting in that doctor’s room, never in my wildest dreams could I have imagined that I would be standing on the Olympic podium. Never could I have imagined winning Canada’s first medal of the Sochi games. When they put the medal around my neck, my rib still hurt, but it was a good pain.

After all I had been through, the bronze felt like gold.

Snowboarding is the only life I could imagine living. I love being on the first chair of the morning, and hiking out to find that good terrain that nobody else has gone on. I love traveling around in a van with my friends, and waking up every morning to two feet of fresh powder. Sometimes we put our bodies in harm’s way, but as long as you’re being smart, you can snowboard safe and still push the limits. It’s the risk combined with the reward that makes it a pretty crazy, cool life.