fixed addSubscription function