APPLETON, Wis. (AP) — A man stabbed his pregnant ex-girlfriend and killed her 3-year-old daughter in Wisconsin to unburden himself from his anger, according to a criminal complaint.

Demetrius Williams, 25, appeared in Outagamie County Circuit Court on Monday on charges of first-degree intentional homicide and and two counts of attempted first-degree intentional homicide. Bond was set at $2 million cash.

Court records show a public defender will be assigned to Williams.

The complaint said Williams was upset the woman didn’t want to be together anymore so he stabbed her and the child last week in Appleton.

“He was beginning to feel that his girlfriend who was pregnant with his child was beginning to distance herself from him. He began to concoct a plan to kill her and to kill her 3-year-old daughter,” Outagamie County District Attorney Melinda Tempelis said.

WLUK-TV reports police identified the girl as Zyana Corbin. The 27-year-old woman was not identified.

The woman was able to flee the apartment when Williams began attacking her and when she returned she found her daughter had been stabbed, according to prosecutors.

The woman had injuries to her chest and abdomen area, as well as her face and neck. Both she and her unborn child survived.