removed missing values, changed density to frequency for KL computation and also a more sensible break
changed from intersection of 3 history to pairwise match