In a large pan, melt butter over low heat. Whisk in flour, salt and pepper until smooth. Gradually add milk. Bring to a boil. Cook, continually stirring for 2 minutes or until thickened. Remove from heat. Add the cheese and stir until melted. Add potatoes and onion and stir until coated with cheese mixture.