It’s rare — even risky — to move to a new city, spouse and belongings in tow, without the security of a job. But if it’s a calculated risk that comes after extensive planning and strategic thinking, it can pay off.

For 25 years, I worked at a Delaware-based agrichemical company, one of the only microscopy and imaging labs in North America, to exclusively study plant biology. It was rewarding, but the company incurred layoffs and I was among the scientists let go.

Without a job for the first time in nearly three decades, I saw no immediate prospects. I was left to examine my options across the country — where could my expertise be of use?

Rolling the Dice and Landing a Job

With no jobs or interviews lined up, we made the calculated gamble: We sold our house, packed up, and headed to St. Louis.

The city — which was home to the Donald Danforth Plant Science Center, a world-class facility brimming with some of the world’s best and brightest researchers, as well as a major commercial agriculture company, renowned universities, and plant science start-ups — seemed ideal. Soon after we moved, a position that aligned perfectly with my background appeared on Danforth’s jobs page.

My background in microscopy and imaging, and specifically in plant science, was the perfect fit. Already being in St. Louis, I could come in immediately for an interview without any costly travel arrangements, and deliberately having chosen to live in an unfamiliar city demonstrated commitment to being at the center of the industry.

Just 13 days after sending my email application, I landed the position. Had I waited for an offer before moving, I might’ve missed my dream job.

Taking a Calculated Leap of Faith

You can see this wasn’t pure luck; calculated risk and determination were involved. Here are four suggestions for landing in your dream destination:

1. Find out where your industry is thriving. What parts of the world are nurturing your industry? If you don’t start here, finding work in a new city will be a much bigger gamble. There’s no sense in spending a small heap of money moving thousands of miles away if your prospects are slim. Consider this: Who do you admire in your industry, and where have they set up shop? Where are new exciting businesses launching?

2. Learn about the lifestyle expense. In addition to a new job; you’re looking for a new life, so you must consider your lifestyle outside the office. While cost of living and quality of life are related, they’re not the same. A city may have a low cost of living but also paltry options for education, entertainment, and community.

When I began spotting regular enthusiasm, vibrancy, and activity throughout St. Louis, we analyzed the cost of living. Prior to moving, we examined prices at grocery stores, restaurants, and gas stations, and we checked public tax records for home sales, property tax, sales tax, and other fees.

3Be flexible on salary. Remember: Building a life in a new city is a form of starting over. When I applied, I assured them that I was willing to work at the compensation level listed. While I’d been positioned to become director of the imaging lab at my Delaware job, I understood that at Danforth, I was beginning again; learning and supporting the company were more important than maintaining my title and salary level. You might have to make similar adjustments to move to your dream job, and that’s OK.

4. Have standby jobs in mind. It took time between losing my Delaware position to landing my St. Louis role. I was fortunate enough to sell my house for the highest amount possible, and this gave us the best foundation for a period of uncertainty.I was also willing to paint houses or hang drywall until something came along or to supplement a lower salary. The gig economy has made big moves like this more realistic: One-third of Americans now do some kind of gig work, and companies increasingly rely on contract workers.

My situation involved a lot of moving parts, and I won’t lie and say it was a total breeze. Circumstances beyond my control forced me to make a move, but careful planning can solve issues in advance and smooth out a potentially rough road. The key to moving to your dream city comes down to confidence and diligence — and both are within your grasp.

Follow us here and subscribe here for all the latest news on how you can keep Thriving.

Stay up to date or catch-up on all our podcasts with Arianna Huffington here.