add main with counters