Preheat a skillet over low heat. Add the oil and the onions and toss the onions to coat. Cover and cook for 15 minutes, leaving a little gap for steam to escape.
In a medium-size pot, cover potatoes in water. Place a lid on the pot and bring to a boil. Once boiling, cook for about 20 more minutes or until potatoes are easily pierced with a fork.
When the potatoes are done boiling, drain them well and mash. Add the onions.
In a large skillet, melt the margarine over medium-high heat. Add the mushrooms and sauté for about 7 minutes until the mushrooms are soft.
Before adding the sauerkraut to the pan, give it a squeeze over the sink to get out as much water as you can. Add sauerkraut to the pan and cook for about 10 minutes, cooking out any excess water. Season with the pepper. The filling shouldn't look dry (a small amount of water is ok).
Mix dough ingredients and knead until soft and smooth. Roll out dough and cut out 3 1/2 - 4 inch circles, or make a log about 1 1/2 inches thick and cut off 1 inch sections to roll into a circle.
Put 1-2 Tablespoons of either the potato filling or the sauerkraut filling on the dough and fold over. Pinch to seal. Boil for 4-5 minutes till the pierogi floats.
You can eat it like this or fry in butter which is how I like them! Add a dollup of sour cream if you like.