Finished insertChild function