http://www.cs.indiana.edu/~dfried/dfried/mex.pdf