+ outsvg << "<text fill=\"black\" class=\"seri\" font-size=\"24\" x=\"" + toString(int(0.25 * width)) + "\" y=\"" + toString(int(0.625 * height)) + "\">The number of species in group " + lookup[0]->getGroup() + " is " + toString(numA) + "</text>\n";
+ outsvg << "<text fill=\"black\" class=\"seri\" font-size=\"24\" x=\"" + toString(int(0.25 * width)) + "\" y=\"" + toString(int(0.65 * height)) + "\">The number of species in group " + lookup[1]->getGroup() + " is " + toString(numB) + "</text>\n";
+ outsvg << "<text fill=\"black\" class=\"seri\" font-size=\"24\" x=\"" + toString(int(0.25 * width)) + "\" y=\"" + toString(int(0.675 * height)) + "\">The number of species in group " + lookup[2]->getGroup() + " is " + toString(numC) + "</text>\n";
+ outsvg << "<text fill=\"black\" class=\"seri\" font-size=\"24\" x=\"" + toString(int(0.25 * width)) + "\" y=\"" + toString(int(0.7 * height)) + "\">The number of species in group " + lookup[3]->getGroup() + " is " + toString(numD) + "</text>\n";
+
+ outsvg << "<text fill=\"black\" class=\"seri\" font-size=\"24\" x=\"" + toString(int(0.25 * width)) + "\" y=\"" + toString(int(0.725 * height)) + "\">The number of species shared between groups " + lookup[0]->getGroup() + " and " + lookup[1]->getGroup() + " is " + toString(sharedAB) + "</text>\n";
+ outsvg << "<text fill=\"black\" class=\"seri\" font-size=\"24\" x=\"" + toString(int(0.25 * width)) + "\" y=\"" + toString(int(0.75 * height)) + "\">The number of species shared between groups " + lookup[0]->getGroup() + " and " + lookup[2]->getGroup() + " is " + toString(sharedAC) + "</text>\n";
+ outsvg << "<text fill=\"black\" class=\"seri\" font-size=\"24\" x=\"" + toString(int(0.25 * width)) + "\" y=\"" + toString(int(0.775 * height)) + "\">The number of species shared between groups " + lookup[0]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedAD) + "</text>\n";
+ outsvg << "<text fill=\"black\" class=\"seri\" font-size=\"24\" x=\"" + toString(int(0.25 * width)) + "\" y=\"" + toString(int(0.8 * height)) + "\">The number of species shared between groups " + lookup[1]->getGroup() + " and " + lookup[2]->getGroup() + " is " + toString(sharedBC) + "</text>\n";
+ outsvg << "<text fill=\"black\" class=\"seri\" font-size=\"24\" x=\"" + toString(int(0.25 * width)) + "\" y=\"" + toString(int(0.825 * height)) + "\">The number of species shared between groups " + lookup[1]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedBD) + "</text>\n";
+ outsvg << "<text fill=\"black\" class=\"seri\" font-size=\"24\" x=\"" + toString(int(0.25 * width)) + "\" y=\"" + toString(int(0.85 * height)) + "\">The number of species shared between groups " + lookup[2]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedCD) + "</text>\n";
+
+ outsvg << "<text fill=\"black\" class=\"seri\" font-size=\"24\" x=\"" + toString(int(0.25 * width)) + "\" y=\"" + toString(int(0.875 * height)) + "\">The number of species shared between groups " + lookup[0]->getGroup() + ", " + lookup[1]->getGroup() + " and " + lookup[2]->getGroup() + " is " + toString(sharedABC) + "</text>\n";
+ outsvg << "<text fill=\"black\" class=\"seri\" font-size=\"24\" x=\"" + toString(int(0.25 * width)) + "\" y=\"" + toString(int(0.9 * height)) + "\">The number of species shared between groups " + lookup[0]->getGroup() + ", " + lookup[1]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedABD) + "</text>\n";
+ outsvg << "<text fill=\"black\" class=\"seri\" font-size=\"24\" x=\"" + toString(int(0.25 * width)) + "\" y=\"" + toString(int(0.925 * height)) + "\">The number of species shared between groups " + lookup[0]->getGroup() + ", " + lookup[2]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedACD) + "</text>\n";
+ outsvg << "<text fill=\"black\" class=\"seri\" font-size=\"24\" x=\"" + toString(int(0.25 * width)) + "\" y=\"" + toString(int(0.95 * height)) + "\">The number of species shared between groups " + lookup[1]->getGroup() + ", " + lookup[2]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedBCD) + "</text>\n";
+
+ //make adjustments
+ sharedABC = sharedABC - sharedABCD;
+ //cout << "num abc = " << sharedABC << endl;
+ sharedABD = sharedABD - sharedABCD;
+ //cout << "num abd = " << sharedABD << endl;
+ sharedACD = sharedACD - sharedABCD;
+ //cout << "num acd = " << sharedACD << endl;
+ sharedBCD = sharedBCD - sharedABCD;
+ //cout << "num bcd = " << sharedBCD << endl;
+
+ sharedAB = sharedAB - sharedABC - sharedABCD - sharedABD; //cout << "num ab = " << sharedAB << endl;
+ sharedAC = sharedAC - sharedABC - sharedABCD - sharedACD; //cout << "num ac = " << sharedAC << endl;
+ sharedAD = sharedAD - sharedABD - sharedABCD - sharedACD; //cout << "num ad = " << sharedAD << endl;
+ sharedBC = sharedBC - sharedABC - sharedABCD - sharedBCD; //cout << "num bc = " << sharedBC << endl;
+ sharedBD = sharedBD - sharedABD - sharedABCD - sharedBCD; // cout << "num bd = " << sharedBD << endl;
+ sharedCD = sharedCD - sharedACD - sharedABCD - sharedBCD; //cout << "num cd = " << sharedCD << endl;
+
+ numA = numA - sharedAB - sharedAC - sharedAD - sharedABCD - sharedABC - sharedACD - sharedABD;
+ //cout << "num a = " << numA << endl;
+ numB = numB - sharedAB - sharedBC - sharedBD - sharedABCD - sharedABC - sharedABD - sharedBCD;
+ //cout << "num b = " << numB << endl;
+ numC = numC - sharedAC - sharedBC - sharedCD - sharedABCD - sharedABC - sharedACD - sharedBCD;
+ //cout << "num c = " << numC << endl;
+ numD = numD - sharedAD - sharedBD - sharedCD - sharedABCD - sharedBCD - sharedACD - sharedABD;
+ //cout << "num d = " << numD << endl;
+
+ //draw circles
+ outsvg << "<ellipse fill=\"red\" stroke=\"black\" opacity=\".35\" transform=\"rotate(-45 " + toString(int(0.51 * width)) + " " + toString(int(0.27 * height)) + ") \" cx=\"" + toString(int(0.51 * width)) + "\" cy=\"" + toString(int(0.27 * height)) + "\" rx=\"" + toString(int(0.29 * width)) + "\" ry=\"" + toString(int(0.14 * height)) + "\"/>\n ";
+ outsvg << "<ellipse fill=\"green\" stroke=\"black\" opacity=\".35\" transform=\"rotate(+45 " + toString(int(0.51 * width)) + " " + toString(int(0.27 * height)) + ") \" cx=\"" + toString(int(0.51 * width)) + "\" cy=\"" + toString(int(0.27 * height)) + "\" rx=\"" + toString(int(0.29 * width)) + "\" ry=\"" + toString(int(0.14 * height)) + "\"/>\n ";
+ outsvg << "<ellipse fill=\"blue\" stroke=\"black\" opacity=\".35\" transform=\"rotate(-40 " + toString(int(0.63 * width)) + " " + toString(int(0.36 * height)) + ") \" cx=\"" + toString(int(0.63 * width)) + "\" cy=\"" + toString(int(0.36 * height)) + "\" rx=\"" + toString(int(0.29 * width)) + "\" ry=\"" + toString(int(0.14 * height)) + "\"/>\n ";
+ outsvg << "<ellipse fill=\"yellow\" stroke=\"black\" opacity=\".35\" transform=\"rotate(+40 " + toString(int(0.36 * width)) + " " + toString(int(0.36 * height)) + ") \" cx=\"" + toString(int(0.36 * width)) + "\" cy=\"" + toString(int(0.36 * height)) + "\" rx=\"" + toString(int(0.29 * width)) + "\" ry=\"" + toString(int(0.14 * height)) + "\"/>\n ";