Preheat oven to 180 degrees Celsius, in a saucepan on medium heat add butter, once melted, add onions and garlic cook until translucent, add flour, stir until well integrated, and the rawness is no more, turn heat to low, add stock stirring continuously until the mixture has thickened. turn heat off, add cheese and stir until melted, add potatoes mix, transfer to a greased baking dish cover, and bake for approximately 1 hr, remove cover and bake for another 30 minutes until potatoes are cooked.