modification on CounterActivity class