Grease your casserole dish.
Preheat your oven to 180 °C, 160 °C Fan, 350 °F, Gas Mark 4.
Peel and thinly slice your potatoes about 2 mm thick. If using a food processor use a 2mm slicing attachment.
Keep your potato slices in water while you slice and cook your onions.
Slice your onions to 2 mm thick.
Microwave onions in a bowl with a nob of butter for 2 to 3 minutes on full power until soft.
Alternately layer the potatoes and onions, starting with the potatoes. Add plenty of seasoning and sprinkle with thyme.
Carry on like this until you have used all the potatoes and onions. The slices of potatoes should overlap slightly within each layer.
Dot the final layer of potato with half of the remaining butter before pouring over the milk and hot stock.
Cover with foil and bake for about an hour.
Remove foil and dot with the remaining butter and bake for a further 30 minutes until golden. If making a 2 servings dish, bake for a further 10 to 15 minutes. A 4 servings dish will need 15 to 20 minutes.