change ES API to wrapped version