Added initial counter code