wrote most of inheritance hierarchy checking. waiting for answers from piazza.