AAI: made numOfUnits local