Completed second half of the assignment.  Should be final version.