http://www.cs.utexas.edu/~witchel/380L/lab/assign3.html