add close-websocket fn