Peel potatoes ad cut into 1 inch cubes.
Bring water to a boil in large saucepan; add potatoes and cook until tender.
Drain, reserving liquid - Set potatoes aside.
Measure 1 Cup cooking liquid, added water if necessary - set aside
Peel and finely chop onion. Melt butter in saucepan over medium heat.
Add onion to saucepan, cook, stirring frequently, until onion is translucent and tender, but not brown.
Add flour to saucepan, season with pepper flakes and black pepper to taste. Cook 3 to 4 minutes.
Gradually add potatoes, reserved 1 cup cooking liquid, milk and sugar to onion mixture in saucepan. Stir Well.
Add cheese and ham.
Simmer over low heat 30 minutes, stirring frequently.
Store leftovers, covered in refrigerator.