refactored to start using the pubsub object