moved updateCounters to purge