baby screaming when he poops

Hannah
My 5 week old has been screaming hysterically the past 4 days when he poops. I haven't changed formula but have started an anti colic and GERD medication. Why would pooping cause screaming. All of his stools are pasty/loose, non hard so I don't think it's constipation. Any ideas? I feel so sorry for my little guy, sounds like he is in so much pain