As undergrads at MIT, Zahir Dossa and Joshua Maciejewski dreamed of starting a business together. Ten years later, in 2015, the friends teamed up with cosmetic chemist Hien Nguyen to found Function of Beauty, a direct-to-consumer company based in New York City that creates personalized hair care products. Dossa, who began flying this year, and Maciejewski, who has been flying since he was a teenager, both see taking flight as a way to practice the mental discipline they need to lead their business. "Aviate, navigate, communicate--and do it in that order," says Maciejewski. "Focus first on the day-to-day things that keep the company moving forward, and then continuously share that vision with your team." Here, Dossa reflects on their journey. --As told to Anna Meyer

I became friends with Josh around 2005, while we were undergrads at MIT, and we quickly knew we wanted to start a business together. After graduation, those dreams were put on hold while Josh left for the Navy, and I stuck around to complete my degrees. 

Meanwhile, I looked into which industries had inefficiencies and decided that beauty held the biggest opportunity. Consumers need customized beauty products, particularly customized hair products, but no one really offered them.

In 2014, when I first pitched the idea to Josh, who had studied engineering in school, he laughed for several minutes straight. But he came around to it when he realized the complex engineering, scientific, and technological needs that were ahead of us: We wanted to fill bottles automatically, and getting products to match consumers' individualized hair care needs was going to be a major technological feat. 

But we figured it out. After the company launched in 2015, we finally got an automatic fill that fit our standards. We also got accepted into Y Combinator that same year.

In 2017, our company was valued at $110 million, and we raised $12 million in our Series A. Since that first automatic fill, we've filled more than one million unique formulas for customers. The fast growth has been a wild ride, but every entrepreneur needs something to balance the hectic lifestyle. For us, that's flying planes. 

Josh has been flying planes since he was a teenager, and his passion for flying encouraged me to make it one of my 2019 resolutions to learn how to fly as well. For both of us, flying is like a mindful meditation that helps us forget about the company for a little bit and focus on nothing else but controlling the plane safely. It's completely engrossing and a hobby that's helped me apply that similar focus to my work.

For no matter what it is--flying or starting a business--there's a lot of menial stuff that you have to do to put yourself in the right position. But once you're there, you can finally start having fun with it.

From the May 2019 issue of Inc. Magazine