added communication with pubsub