private void removeLeftistTree(LeftistTreeNode startingNode) {
        if (this.root != null) {
            LeftistTreeNode toBeRemoved = this.root;
            LeftistTreeNode newRoot;
            if (this.root.right == null) {
                if (this.root.left == null) {
                    this.root = null;
                } else {
                    this.root = this.root.left;
                    this.root.parent = null;
                }
                System.out.println("\nElement removed successfully.");
            } else {
                if (toBeRemoved.left.value.compareTo(toBeRemoved.right.value) > 0) { // invert here to change to small priority on top
                    newRoot = toBeRemoved.left;
                    newRoot.parent = null;
                    merge(newRoot, toBeRemoved.right);
                    this.root = newRoot;
                } else {
                    newRoot = toBeRemoved.right;
                    newRoot.parent = null;
                    merge(newRoot, toBeRemoved.left);
                    this.root = newRoot;
                }
                performSwap(this.root.right);
                System.out.println("\nElement removed successfully.");
            }
        }

    }