implemented the counter, PC