fixed the indexing of the field names variable
try list comprehension
assign list comprehension to variable