better websockets structure