Everyone has suffered through constipation at one time or another. In fact, a recent study published in the American Journal of Gastroenterology suggests that the number of people visiting the emergency room in the U.S. is going up, costing about $1.6 billion in 2011. The inability to “go” is not only uncomfortable, but it can also come with health risks including hemorrhoids and fecal impaction. While laxatives are your best bet for treating constipation, what can you do to prevent it?

We got this email from a viewer:

Q: I have chronic constipation and I depend on laxatives. Are there any lifestyle changes that I can make to improve my digestion?

It is impossible to completely stop constipation, but you can make changes to avoid it.

- Stay hydrated. There is no general consensus on how much water you should drink but the Institute of Medicine determined that the an adequate intake of beverages for a man is roughly 13 cups and for women, 9 cups. In addition to drinking liquids, you should avoid foods that work counteractively, like caffeine. While coffee can work as a stimulant, it can also dehydrate you.

- Eat fiber-rich foods. According to the Mayo Clinic, women should aim for 21-25 grams of fiber a day, while men should try for 30-38 grams. You can find digestion-aiding fiber in everything from fruits like berries, apples and pears to grains like bran flakes and barley. Cooked foods like split peas, lentils and beans are another great source. Other cooked options include artichokes, broccoli and Brussels sprouts. Avoid processed foods because they usually don’t have sufficient fiber.

- Exercise. One of the best ways to keep constipation at bay is to exercise regularly. Physical movement not only works your muscles but it also stimulates the natural contraction of your intestines, helping move stool through your system quickly and effectively.

As always, see a doctor before you make any changes to your diet or lifestyle.