fixed bug where parent is duplicated for each child, not being pushed into children array