refactored counters.