Anyone who has a dog probably has a carpet with their fair share of pet stains. Some dogs aren’t trained to go outside and others, stopping just short of flipping you off as you point to the backyard, just don’t care; it’s not them who has to clean up the mess. You may have tried everything from punishing your Pomeranian to bribing your Boxer only to realize that the mantra is true: accidents happen.

So, what do you do when these accidents happen? What actions do you take when they’ve turned your white carpet beige, left a perma-scent in your living room, and caused you to take up Feng Shui in an attempt to cover troubled areas? Well, don’t tell your pup to pack his doggy bag just yet: pet messes aren’t the end of the world. Remove the stain and keep the dog with the following tips:

Have a Doggy Door: Any dog that lives in a house or an apartment without a doggie door isn’t to blame for accidents. What exactly are they supposed to do if no one’s home? Use the toilet? Doggy doors allow dogs to come and go (and pee and poop) as they please. They also keep owners from having to wake up at three a.m. to let out Rover who, in what wasn’t the world’s best decision, had Mexican for dinner.

Put up Pet Gates: If you are unable to have a doggie door – you live in an apartment, for instance – putting up an indoor pet gate can help limit your dog’s desire to mess while limiting the available areas. Dogs generally don’t like to leave a mess if they are confined to a small area (they are more a “pee on the carpet then pretend it wasn’t me by getting as far away as possible” species). But, even if they do go, placing a pet gate in a tiled area, such as in the bathroom or the kitchen, will help assure clean up duty (or clean up “doodie”) is as easy and stain-free as possible.

Get Hardwood Floors: In every fiber eating, water drinking pet owner’s life may come the big decision: carpet or hardwood floors. If your carpet gets to the point where it is beyond repair, cut the rug and get hardwood floors. Not only will this take care of your stain problems, but it will also relieve your house of the pet odor that company has begun to mistake for a Glade Plug-in, gone very wrong.

Remove the Stain, but Find it First: Sometimes finding the pet stain is the hardest part of the journey; urine messes don’t exactly scream out at you. If you aren’t unfortunate enough to actually step in the mess, you may need assistance. There are black lights available for the purpose of detecting pet stains, which helps you to get to the source of the problem.

For stains that are obvious, there is a slug of pet removal products available online and in pet stores. The variety of products allows you to get what you really want. Some require vacuums, some requires shampooers, and some require just a little elbow grease. In some cases, just using warm water and detergent can get take care of the stain. When all else fails, you can always give your dog the best ultimatum: tell him to either quit messing, or you’re getting a cat.