implement csv stream