It all began, as so many scientific breakthroughs do, with something quite else. Clifton Meloan wanted "a better way to do analytical chemistry."

What Meloan, a researcher and professor at Kansas State University, found was that it is quite true, as those clever old wives always said, that bay leaves and cucumbers are good cockroach repellents. What is more, Meloan knows just what substances in both bay leaves and cucumbers do the repelling and more or less why.

How the 51-year-old chemist got from his search for a way to isolate a single molecule in a cell to the (sliced) cucumber-bay leaf repellent, is a study in scientific methodology spiced with serendipity and laced with folklore. The scientific part was published in Science magazine earlier this month. Here's the rest.

As Meloan recalls, he began with an aphorism he heard as a child: "If man can do it, nature does it better."

Insects, he knew, followed small groups of molecules for miles.

So get a bug -- their sensors, he says, are "good analytical chemists for that molecule."

But his first project -- the search for the molecule -- was sidetracked by more compelling social imperative.

Meloan had heard that a crushed bay leaf in the cupboard will keep roaches out.

So find out why -- by isolating the chemical in the leaf the roaches don't like.

"Of course," he notes, "it's a lot harder to prove you can repel something than attract it. If you attract them, they're there. If they're not there, that doesn't necessarily mean you've repelled them.

"First you have to get them, and then if you drive them away, you've got it."

Meloan and his team first built cockroach chambers they knew were the last word in roach dreamhouses: "They like edges and vertical surfaces and we know they like it dark."

Two test chambers, covered with cardboard, were constructed. One contained the chemicals isolated carefully from bay leaves. The other was empty. About 30 or 40 roaches were let loose from a big jar and "then," says Meloan, "we hit the lights. They hate light, so they ran into the chambers. If they came right back out because they didn't like the odor, we had a repellent. We tried a new chemical every half-hour for six or eight hours at a time.

"The cucumber came later. I wanted some photographs to illustrate a lecture on the bay leaf thing and took a slide to the photographer. The woman there looked at it and asked, 'what's that?'

"I said, 'It's a cockroach.'

"She said, 'I know it's a cockroach. What's the leaf?' I told her and she said, 'Gee, you should try the old German method--a cucumber."

Meloan, who says the only reason he could find for it being called the "German" method was because a German woman had been his informant's cucumber source, tried a whole cucumber.

It didn't work at all.

He told a colleague about it and the colleague promptly told him about seeing a plate of sliced cucumbers at a cafeteria. The colleague recalled making some sort of joke about restaurants that garnished tables as well as food and was told quite seriously by the manager, "Oh, we're expecting a visit from the health inspector and we didn't want any roaches around."

Back to Meloan's drawing board (or roach chamber.) Slice the cuke and it works just fine, he found. Chop it up and it works even better, repelling about 80 percent of the ubiquitous creepies. "It's like an onion," he says, "a whole onion won't make you cry, but you start chopping it up . . . rupturing cell walls . . ." Meloan has isolated two cuke chemicals that roaches hate, and there may be more. (There are six in the bay leaves.)

And now Meloan, suddenly "Dr. Cockroach," has had queries from as far away as Brazil and China, he says, and he's working with a company to incorporate the discovery, somehow, into grocery bags or beer or soda six-packs, the vehicles for getting most roaches into most homes. Meanwhile, he cautions, one bay leaf won't roach-proof your house, but a few crushed in your cabinets (and changed fairly often) will protect the food.

Now he's working on Osage oranges, those inedible yellow-green fruits that "if the old wives are to be believed, repel half the world."