HELP! Contractions or gas

a few months ago i has really bad gas pains that kinda felt like contractions and i had them like every night in the middle of the night for like a week or two. now i'm 38 weeks and i woke up this morning feeling them but this time kinda in my pelvic area. they keep coming and going when i switch positions and hurt very very bad. i've been to the bathroom like 5 times this morning trying to see if it is just gas/diarrhea pain. If i move from lying down to sitting up they don't hurt as bad. any thoughts? also getting a pinching pain in my urethra or vagina can't tell