lab4 fix counters