updated the similarity calculations