Boil sliced potatoes and onion until you can insert a fork into the potato easily.
Drain water and place sliced potatoes into a baking dish.
In a large skillet, melt butter and add flour.
Let cook for about 2 minutes, stirring so it won't burn.
While stirring, add about a cup of water to the mixture to thin it out.
Then add one can of milk and possibly some of the other can until the mixture is about the consistency of gravy.
Add 3/4 of the package of cheese and stir until it's melted.
Add salt and pepper to taste.
Pour mixture over potatoes and sprinkle remaining cheese on top.
Bake at 350 degrees until sauce is bubbly and top cheese is lightly brown.