Added to_csv method