writes results into output_data folder in data folder