modified for counter2