I started taking metformin and I pooped myself

This is my 2nd day on metformin. I am taking 500mg 3 times a day. I just pooped myself while walking home and I feels awful. Please someone tell me the diarrhea gets better or what can I do to make it better.