replaced RandIndex computation with much more efficient version