added function to compute divergence between a pair of sequences