Preheat your oven to 400 degrees F Oil a deep 9x13 baking dish Thinly slice 3 1/2 pounds potatoes and 1 small onion

Making the sauce

In a saucepan on medium heat, melt 3 tablespoons butter Add the sliced onion and 4 cloves of minced garlic Saute for 2-3 minutes until soft and translucent

Sprinkle 1/4 cup all purpose flour to coat the onions Slowly whisk in 1 cup chicken stock until the mixture has thickened Pour in 2 cups milk and whisk until fully combined

Stir in  1 tsp fresh thyme,  1 tsp salt,  and  1/2 tsp black pepper Remove the sauce from heat and set aside

Arrange the sliced potatoes in your oiled 9x13 baking dish Pour 1/2 of the sauce over the potatoes Sprinkle 1 cup shredded cheddar cheese and 1/4 cup freshly grated parmesan cheese over the top

Pour the remaining sauce over the cheese top with another 1/4 cup freshly grated parmesan cheese and another 1 cup shredded cheddar cheese Cover with foil and bake for 30 minutes  Remove the cover and bake for an additional 25 minutes until browned