working on readin the fields of the tuple and creating the doc