diff --git a/matlab/+SSF/gen_SSF_kymo.m b/matlab/+SSF/gen_SSF_kymo.m
index d73fac9cd151518af5f3821136150c5de7b49d42..130871e45a57944087497af420d4619e9c97716e 100644
--- a/matlab/+SSF/gen_SSF_kymo.m
+++ b/matlab/+SSF/gen_SSF_kymo.m
@@ -3,7 +3,7 @@
 % targetChannelNames = {'Erk SSF'; 'Akt SSF' ; 'DHB SSF'; 'H2B SSF'; 'velocity SSF'}; % channel names in the kymo
 % targetChannelNames = {'Erk SSF'; 'Oct4 SSF' ;  'H2B SSF'; 'velocity SSF'}; % channel names in the kymo
 % targetChannelNumbers = [2, 3, -1]; % maps image channel names to kymo channel names
-function gen_SSF_kymo(strDB,targetChannelNames,targetChannelNumbers,bDownscale, startFrame)
+function gen_SSF_kymo(strDB,targetChannelNames,targetChannelNumbers,outfolder,bDownscale, startFrame)
 
 if ~exist('bDownscale','var')
     bDownscale = false;
@@ -22,9 +22,9 @@ else
 end
 L = length(flist);
 
-cacheFolder = fullfile(ROOT,'kymoV2');
-if ~exist(cacheFolder,'dir')
-    mkdir(cacheFolder);
+
+if ~exist(outfolder,'dir')
+    mkdir(outfolder);
 end
 
 imd={};
@@ -33,7 +33,7 @@ p = ljsStartParallel(16);
 parfor ff=1:L
 % for ff=1:L    
     str_ff = fullfile(flist(ff).folder,flist(ff).name);     
-    if exist(fullfile(cacheFolder,[flist(ff).name '_ssf_cache.json']),'file')
+    if exist(fullfile(outfolder,[flist(ff).name '_ssf_cache.json']),'file')
         fprintf(1,'genKymo skipping %s kymo exists\n',str_ff);
         continue
     end
@@ -46,11 +46,11 @@ parfor ff=1:L
     imVolume = imVolume(:,:,startFrame:end,:); % trim off first 30 frames
     imd{ff}=MicroscopeData.MakeMetadataFromImage(imVolume);
     imd{ff}.DatasetName=[flist(ff).name '_ssf_cache'];
-    imd{ff}.imageDir = cacheFolder;
+    imd{ff}.imageDir = outfolder;
     imd{ff}.ChannelNames = targetChannelNames;
-    MicroscopeData.WriterH5(imVolume,'imageData',imd{ff},'path',cacheFolder);  
+    MicroscopeData.WriterH5(imVolume,'imageData',imd{ff},'path',outfolder);  
 
     tElapsed = toc(t0);
     fprintf(1,'ssf_volume %d tElapsed=%0.2f\n',ff,tElapsed);
 end
-Import.leverImport('',cacheFolder);
\ No newline at end of file
+Import.leverImport('',outfolder);
\ No newline at end of file