use csv writer to store result