added new experimental version of the code to utilize more of the data, assuming one of the two time series is longer than the other