created counter class