re-implementing cosine score