code changes to implement counters