H.M.
My son did pretty much the same thing but instead of the carpet it was the walls in his room. I put a door knob cover on his door so when i heard him crying to go into his room i pretty much knew what he was going to do. If we didn't make it to the potty in time i would dump his pullup into the potty to show him where it was supposed to go. It took time and patience but he finally learned he was supposed to poop in the potty.