Subscription logic out of client code