added counter.c