thank god this homework is done.  this took me about 5 hours.