adding equivalence computation for reference