added working unittest and replaces childrenFrom query with cycle killing version