implemented Counter