add basic support for pubsub