modified to show counter value