Modified Counter class