implement default websocket function