update for latest rust + write to websocket