Preheat your oven to 400 degrees FOil a deep 9x13 baking dishThinly slice 3 1/2 pounds potatoes and 1 small onion
Making the sauce
In a saucepan on medium heat, melt 3 tablespoons butterAdd the sliced onion and 4 cloves of minced garlicSaute for 2-3 minutes until soft and translucent
Sprinkle 1/4 cup all purpose flour to coat the onionsSlowly whisk in 1 cup chicken stock until the mixture has thickenedPour in 2 cups milk and whisk until fully combined
Stir in 1 tsp fresh thyme, 1 tsp salt, and 1/2 tsp black pepperRemove the sauce from heat and set aside
Arrange the sliced potatoes in your oiled 9x13 baking dishPour 1/2 of the sauce over the potatoesSprinkle 1 cup shredded cheddar cheeseand1/4 cup freshly grated parmesan cheese over the top
Pour the remaining sauce over the cheesetop with another 1/4 cup freshly grated parmesan cheeseandanother 1 cup shredded cheddar cheeseCover with foil and bake for 30 minutes Remove the cover and bake for an additional 25 minutes until browned