Changed similarity formula