A man testified Tuesday that he spent about eight hours cutting up his wife’s body after she died at a Missouri hotel because he was afraid authorities would take away his children.Justin Rey, 36, said protecting his family was the reason he didn’t call for medical help after his wife delivered a baby at the hotel in October and afterward when she killed herself, The Kansas City Star reported . Investigators later found Rey with his newborn and 2-year-old daughter, along with bags of body parts, at a storage shed in Lenexa, Kansas.Rey is not charged in his wife’s death, but faces child endangerment charges in Kansas and Missouri and is charged with abandonment of a corpse in Missouri. He took the unusual step of testifying at his preliminary hearing in Kansas, with defense attorney Zane Todd saying Rey wanted to correct some witness testimony. After Tuesday’s hearing, a not guilty plea was entered for Rey to Johnson County, Kansas, charges of two counts of aggravated child endangerment and two counts of contributing to a child’s misconduct.“It’s something I had to do,” Rey testified. “My family is very dear to me. It’s something I had to do to protect my family.”One officer who met Rey at the storage unit said the 2-year-old appeared unhealthy and “almost looked like she had cancer.” The baby had a serious eye infection, according to several witnesses. The children were put in protective custody.Rey has said in the past that his wife died in childbirth, but Lenexa police detective Shannon Murphy testified that Rey told her his wife had killed herself. After having his children pose for photographs with her body, Rey said he “skinned her like a fish,” Murphy testified. Murphy said Rey flushed body parts that would not fit in containers down the toilet.Deputy Johnson County Coroner Charles Glenn testified that “a number” of stab were wounds found on some parts of Jessica Rey’s body but that it wasn’t possible to tell whether the injuries were inflicted before or after she died.Rey told the court that he and the children had not been living at the storage locker, as witnesses said, but had been there for only about 11 hours while preparing to travel to Arizona, where he said he intended to give his wife a proper burial. He also said his children were well cared for.“I didn’t endanger my children,” he testified. “My children were perfectly healthy.”Rey also denied flushing anything but a placenta down the toilet.His trial on the Kansas charges was scheduled for Nov. 5.Rey also was charged in November in California in the death of Sean Ty Ferel, a Palm Springs resident who disappeared after vacationing with Rey in 2016. Ferel’s body hasn’t been found, but his blood was detected in the trunk of his vehicle after Rey was involved in an accident with it months after Ferel disappeared.