added pubsub support