1 large onion, peeled and quartered
3 cups pinto beans, rinsed
2 cloves garlic, finely minced
1 TBS salt
pinch of pepper
pinch of cumin
9 cups water
1 cup cheddar cheese. 

Put all ingredients into the slow cooker except the cheese. Cook on high for 8 hours. Add up to 1 cup more liquid if necessary. If you lose more than 1 cup of liquid in the cooking process turn the slow cooker on low.

Strain the beans, reserving the liquid. Mash the beans with a potato masher and add a little cooking liquid to get the consistency you like.

Preheat oven to 350 degrees.
Put half the beans into a large casserole dish and top with cheese. Bake for 45 minutes.