change to each for match to_csv method