update logic to control counters
Merge pull request #3 from mwacc/develop

update logic to control counters