pubsub class