only calculate stats once