Makes use of code from Domination on Sourceforge