added maincounter