update pubsub.rb to work remotely