SCANDIA, Minn.-Greg Amundson couldn't sleep. His home-building company had collapsed, and he lay awake worrying about how he was going to survive. He began half-dreaming about something that only home-builders would think about - caulk.

"No one likes caulk. Caulk is so sloppy," he recalls thinking.

That's when inspiration hit him - for an invention that now seems to be taking off. In mid-June, he hit the jackpot - with a contract to sell his caulking-alternative in 100 Walmarts nationwide. If sales grow as expected, Amundson's product, InstaTrim, will be sold at all Walmarts.

Then he won't lose any more sleep worrying about money.

"It has potential sales up into the millions," said Amundson, 58, of Scandia. "It was just the dumb idea in the little brain-pan of a big, bald Norwegian lying in bed."

Lifelong tinkerer

Amundson became the Thomas Edison of caulk through a long, unlikely path.

His career as an inventor began at age 10, when he created a water-heating solar panel. In college, he invented a way to spray bubbles on the hulls of ships to increase speed. "But it never went anywhere," he said.

In Scandia, he ran his own home-building business, which failed during the Great Recession that began in 2008.

But during his time as a builder, he developed an appreciation - and disdain - for caulk, the white stuff that fills the cracks between walls and tiles. It's one of those hidden products that everyone needs, he said, but no one likes - especially the installers.

Conventional caulk is squeezed out of a tube, with the sticky consistency of toothpaste. It is pressed into place along floorboards and windows, usually with a finger.

But Amundson's midnight inspiration was a solid product which would be unrolled like a garden hose. Instead of a round-shaped bead of caulk, it would be triangular to fit into corners.

The consistency would not be goopy, but solid and soft "like a rubber ball." He pictured a layer of adhesive on the bottom, to make it stick into place.

Amundson went into his garage - and worked there for years. Night and day, he mixed chemicals, created formulas, tested and experimented.

"I call my garage the Mad Lab," said Amundson, "where the crazy scientists with long hair are, going nuts."

The adhesive was particularly tricky. "It took me 4 1/2 years to get it right," he said. He finally created the right degree of sticky-ness, so the product could be peeled off like "picture-hanging putty."

Amundson was granted two patents related to the product.

Then came the hard part.

Financing and selling

He started peddling it, looking for financial backers and a manufacturer.

He tracked down a list of plastic-extruding companies. But making a new product requires up-front investment by the company, and they turned him down. "No one wants to meet with inventors," he said.

But finally, Bio-Plastic Solutions did. The Blooming Prairie company agreed to bring his vision to life.

Amundson and Bio-Plastic co-owner Gary Noble became friends first, then business partners.

They had to re-formulate the product to work in Noble's plastic-extruding equipment, for exactly the right softness and flexibility.

For them it was like baking a cake, without a recipe. Noble said the company only makes money once the product is ready for market. "The bottom line is you never know what it will cost for a new product," said Noble.

They figured out how to apply the adhesive layer. Then came the packaging.

"So you have a package that lays flat. What if someone wants to flip it on its side? What happens to the product inside?" said Noble.

In 2013, Amundson unveiled the product on Amazon with the name - ta-dah! - "Easy Caulk."

It bombed. Sales were flat.

Amundson's wife Betsy blamed the name. This was an antidote to caulk, an alt-caulk, yet "caulk" was right there in the name.

"She said consumers didn't like caulking products, and she was right," said Amundson.

They changed the name to InstaTrim in March 2016. Sales increased 10-fold over the next year to $5,000 a week - at $19.95 for two 10-foot spools.

Sales reached $350,000 a year, but Amundson wanted more. "In the big-boy world, that is just a blip on the radar," he said.

Pilgrimage to Walmart

On June 13, Amundson made a pilgrimage to Bentonville, Ark., the home of the largest retailer in the world. New vendors had applied to Walmart in the spring, and some were invited to the company's "open call" event - a kind of try-out session for new products.

Amundson found himself in a vast building with 750 other entrepreneurs. Flanking the long hallways, 50 of the Walmart "buyers" lurked in small offices, waiting to interview the applicants.

"Everyone was nervous," said Amundson. Vendors paced the halls, rehearsing their sales-pitches out loud, like actors before an audition.

One by one, they were summoned into the rooms. Amundson sat down and made a 30-minute presentation.

When he was done, the buyer gave him a slip of paper called the "golden ticket."

He made it.

Walmart agreed to sell InstaTrim in 100 stores, and then later spread it to all stores if sales went well.

"It was like winning the lottery," he said.

Back home in Scandia, Amundson is scrambling once more, to gear up for the coming demand. Last week he bought a building for a shipping and receiving center for InstaTrim.

He embraces his success - but not for the usual reasons.

"I am not doing this to get rich," said Amundson. "I am doing this to be validated - to be right."

He has advice for anyone who wants to follow in his footsteps.

"If you are going to invent something, invent something like toilet paper - everyone uses it," he said.

"And remember, coming up with ideas is simple. Bringing them to market is the hard part."