huge performance increase in generateCount