testing cosine similarity and dim limits