added code for equivalence score matrix