started counter code