implemented the ability to automatically determine the min. required time series length