http://www.cs.utexas.edu/~fussell/courses/cs378/projects/assignment1/handout.shtml