corrected cosSim
added cosSim