fixed cosine similarity with the magnitude