Seperated the algo for finding the euclidean distance from the one which computes the similarity score