use latest api, debug code