updated websocket response builder