refactor select subscriptions part code