added equality check to base class