counter cleanup based on class example