add ES compatibility mode support