upgrading websockets to new API