Heat oven to 375 F. Layer the potatoes, onion, and ham in a greased 2-quart baking dish. Leftover ham works well, or dice packaged sliced ham. In a bowl, mix the soup, milk, salt, and pepper, and pour it over the potato mixture. Cover and bake 1 hour. Uncover, sprinkle with cheese, and bake 15 minutes more.