In August 2011, Tim Cook took the job as CEO of Apple, leaving many wondering if he could fill the shoes left by his friend and mentor, Steve Jobs.

Today, Apple hit a huge milestone, becoming the first $1 trillion company in the United States, ever. That leaves Cook looking pretty good.

But when he was first announced for the role, he was a big question mark. He had come out of seemingly nowhere to lead such a big, important company. What a lot of people don’t know is that Apple would never have gotten where it is without Cook’s help early on in Jobs’ reign.

Here’s how Tim Cook rose through the ranks and became Apple’s CEO.