Finished swapChilds implementation