Added clases for similarity calculation