allow to set counter as parameter