Adding a reference count mechanism as a different implementation