updated the criteria for similarity