Added cosine similarity
added cosine similarity

added cosine similarity
bugfixes