macro for similarity; cosine similarity