add reference counter class