added cosine similarity computing unit