minor change to createChildNode function