wrap this in an if `childNode` block and remove the `childExists` bool