added an abstract class to define the interface of disjoint sets objects