removing some dependence on decidable equality.