http://www.cs.wisc.edu/~cs838-1/Students/ltokheim/proj2.html