add equals and gethashcode override to base class
code formatting