correctly read papers and created vectors and wrote vectors to a file