I create a new variable fieldsG_dict to keep the index of input data and
return only after reading the data fieldsG as a list