improved websocket server