added an integral counter that I forgot about