fixed incrementing of countUsed