Changed subscribe to use pubsub