updated websocket stuff for pubsub