adding code for cosine similarity function, eliminating unnecessary features, and writing out files