working on the reference count mechanisms to manage subscriptions
still working on reference count, almost sorted it out