Ingredients

Coarse salt and ground pepper

1 pound elbow pasta

4 tablespoons butter

1 small onion, chopped

1/4 cup all-purpose flour (spooned and leveled)

4 cups milk

1/8 teaspoon cayenne pepper, (optional)

1 1/4 cups shredded yellow cheddar cheese (5 ounces)

1 1/4 cups shredded white cheddar cheese (5 ounces)

8 ounces ham, diced into 1/2-inch pieces

2 slices white sandwich bread

Preparation

Preheat oven to 375 degrees. In a large pot of boiling salted water, cook pasta until al dente; drain and reserve. Meanwhile, in a 5-quart heavy pot, melt butter over medium heat. Add onion; cook, stirring occasionally, until softened, 3 to 5 minutes. Whisk in flour to coat onion. In a slow steady stream, whisk in milk until there are no lumps.

Cook, whisking often, until mixture is thick and bubbly and coats the back of a wooden spoon, 6 to 8 minutes. Stir in cayenne, if using, and 1 cup each yellow and white cheddar cheese. Season with 1 teaspoon salt and 1/4 teaspoon pepper.

Toss pasta with cheese mixture; fold in ham. Transfer to a 9-by-13-inch baking dish or individual dishes. Set aside.

In a food processor, pulse bread until large crumbs form. Toss together with remaining 1/4 cup each white and yellow cheddar, and 1/4 teaspoon salt. Top pasta with breadcrumb mixture. Bake until top is golden, about 30 minutes.