public void BSTDelete(Node start, Node root, Node value) {
        Node parent = new Node();
        parent = findParent(root, value, parent);

        //if the node is a leaf
        if (value.left == null && value.right == null) {
            //remove without consequences
            replace(parent, value, null);
            reOrganize(start, root);
        }

        //if the node has one sub-tree(left or right), delete the node and connect the subtree to parent
        if ( (value.left == null && value.right != null) || (value.left != null && value.right == null) ) {
            if (value.left == null) {
                replace(parent, value, value.right);
                reOrganize(start, root);
            } else {
                replace(parent, value, value.left);
                reOrganize(start, root);
            }
        }

        //if the node has both subtrees, replace the node with the minimum element in the right subtree
        if (value.left != null && value.right != null) {
            Node minimum = findMinimum(value.right);
            BSTDelete(start, root, minimum);
            value.value = minimum.value;
        }
    }