When DraftKings first launched five years ago, the climate for fantasy sports was a different game. After experiencing great success, the Boston-based startup had to pivot and change operations to comply with new government regulations. As DraftKings celebrates the its fifth birthday on Thursday, the co-founders reflect on the three most important things that helped it stay afloat during the difficulties of transitions.

Co-founded by Jason Robins, Matthew Kalish, and Paul Liberman in 2012, DraftKings built great success by offering cash prizes for online contests based on fictional rosters of real athletes. Since then, it has acquired more than 7 million registered users globally. FanDuel, one of its primary competitors may merge with DraftKings, pending a review by the Federal Trade Commission.

When DraftKings and FanDuel began seeing phenomenal success, regulators questioned whether the games were forms of illegal gambling and government officials got involved. New York Attorney General Eric Schneiderman sued to shut DraftKings down, and other states like Massachusetts imposed regulations.

1. Get comfortable with change

"Being able to pivot and innovate, that was something that was core to us as a company," says Robins, who is also CEO. "This caused us to become more mature and I think we have maintained being nimble and tackle the challenges that come our way."

After new rules were put into place for fantasy sports, DraftKings needed to build tools that ensured its customers were compliant with regulations. Now, the company uses location technology to offer different games to people of all ages. For example, players must be 21 in Massachusetts, and 18 in New York. So, if an 18-year-old user travels from Brooklyn to Boston, they'd presented with free games that fit the regulations.

2. Gather feedback, and take action

The co-founders say to get through a pivot like the one DraftKings experienced, entrepreneurs need to listen to their customers, be prepared to commit to their company and have a great team ready to work through any potential curveballs.

"Our product revolves around listening to customers," says Liberman, 34, who is also COO. "We have a live event where we have employees speak to different customers about what they like and don't like." One example is "Leagues," a feature launched in August 2015 after fans said they wanted to play DraftKings with friends. It allows players to create their own contests exclusive to the people in their social circles.

3. Marry the business

For DraftKings, much of the action happens at night or on the weekends when sports games take place. Kalish, chief revenue officer, recommends that entrepreneurs think twice about starting a business unless they are fully devoted to all the work involved. "You're always on and if you're going to dive into entrepreneurship, be prepared to nearly never shut off and accept what that entails," he says. "All three of us have made that commitment."

4. Build a great team

Robins, 36, says having the right people around is vital to a company, especially one that faces difficultly or periods of change. He added that DraftKings had an amazing period of growth at the start, but the staff never got too high on the success.

"It's important to keep everybody steady and acknowledge that part of starting and building a company are the ups and downs," Robins says. "We have an amazing team that rose to the challenge...whatever curveballs you should be able to work within that."