Boil the potatoes until you can pierce them with a fork, cool and slice thinly. Melt the butter in a saucepan. Whisk flour into melted butter and cook over medium heat until it thickens. Whisk in the milk and stir constantly until the mixture coats the back of a spoon. Layer the 3 components ending with the grated cheese in a 9 by 9-inch pan. Bake for approximately 40 minutes in a preheated 375-degree F oven.