write_data, make teams csv for use in functions