Starchy pasta cooking water is a key ingredient for thick and silky sauces that cling to noodles. Don’t throw it away! But Josh Silba of Stoughton, Massachusetts, noticed that whole-wheat and gluten-free pastas don’t reliably produce sufficiently starchy water and wondered about a workaround.

Since starch content varies by pasta type—and sometimes we forget we need the cooking water and accidentally toss it—we wanted an easy replacement that uses pantry items.

Generally, we cook pasta in 4 quarts water with 2 tablespoons Diamond Crystal kosher salt. This ratio creates starchy water suitable for most sauces. But some pastas, particularly ones with cream- or cheese-based sauces or ones where we really want to thicken the sauce (see Spaghetti al Limone or Spaghetti Puttanesca.), require particularly starchy water to prevent them from breaking. In those cases, we cook in just 2 quarts water and 1 table­spoon salt to concentrate the starches. (If you’ve been cooking with too much pasta water all this time, don’t worry. You’re not alone, and now you know.)

To recreate both versions, we stuck with a substitute most people are likely to have—cornstarch.

We found that adding just ¼ teaspoon each cornstarch and kosher salt to 1 cup water (the amount of cooking water most recipes suggest reserving) gave us the right consistency of standard pasta cooking water. For a more concentrated batch, we increased the cornstarch to ½ teaspoon.

In both cases, we first needed to bring the mixture to a boil, which gelatinizes starch in water for the thickening properties we wanted. Microwaving it for 2 minutes, stirring, then heating for another 2 minutes worked great. And when we tested pasta recipes using both traditional cooking water and our cornstarch fix, we found them almost indistinguishable.

Try this tip with some of our favorite pasta recipes:

Pasta All’Amatriciana
In Rome, red sauce is rich, hearty and barely there.

Pasta Alla Norma
A simple Sicilian pasta.

Spaghetti Al Limone
The addition of lemon lightens and brightens silky Italian pasta.

Pasta with Pistachios, Tomato and Mint
Here, fresh herbs and nuts brighten this pasta that’s ready in minutes.

Cacio e Pepe
We founds a simple solution for a simple but finicky pasta.

Gemelli Pasta with Chevre, Arugula and Walnuts
We call this the new creamy pasta.

Spaghetti with Lemon, Anchovies and Capers
A fast weeknight pasta from Lidia Bastianich.