added documentation for pubsub