solution for pubsub