make compatible with latest TW