almost all the first draft is done except for writing to pickle and writing to tsv