working on better pubsub integration