keep track of subscriptions and unsubscribe when the notebooks are closed