bit of refactoring of subscription handling