updated to work with new pubsub library