revert -update-children and -update-children-r to functions