fixes #3 by using the length of `historicalData`