added printing results to csv.