add pubsub support