added more methods to EquivalenceClasses class