finished hw4.  Could test and fix the tree stuff so that it's better.