Updated so results return a CSV file