add equivalence classes