implement equivalence realtions