Why is my potty trained child having accidents?

Hi I have a 4 year old daughter who was potty trained by 2 I got pregnant and she started peeing in her pants again she is now 4 and still has accidents. She will go number 2 in the potty but she constantly has accidents. Anyone have any suggestions on how to get her to stop peeing in her pants ?