added cosine similarity metric