added IdCounter class