added words vector and file io
removed failed io function