added class for cosine similarity